Collapse one-line if-endif-if to if-else
Fix accidental extra present on Win8