Improved detection of nested IF statements that use the alternate IF/ENDIF syntax