fix Issue 10498 - `__traits(compiles, ...)` affect program behaviour
Merge pull request #2280 from 9rnsr/fix10498

[REG2.061] Issue 10498 - `__traits(compiles, ...)` affect program behaviour