Maybe if you adopt a style with consistent indentation to emphasize control structures you might avoid certain problems like this.

I mean, the compiler ignores these stylistic niceties, but for...