When detecting any blockstate that is read-only, meaning it depends on the environment around it to be determined, the value returns always false even if the debug menu shows it as true.
To test:
1. Create the conditions for the block types below
2. /testforblock x y z (insert following values)
3. Notice the error message returns that the state is false despite debug menu saying true
grass snowy=true
fence north=true
fence_gate in_wall=true
oak_stairs shape=outer_right
powered_repeater locked=true
...and many others
Related issues
Comments

Resolving to MC-109591.
Relates to MC-109591