fix Issue 12900 - Wrong code in IfStatement condition Expression
Merge pull request #3685 from 9rnsr/fix12900

More conservative fix for issue 12900 - Wrong code in IfStatement condition Expression