Make an endif comment match the actual condition
Merge pull request #800 from mstorsjo/matching-endif

Make an endif comment match the actual condition