18400 Fixed Unexpected {% if %} behavior in templates.

Thanks Florian for the bug report and Bouke for the code review feedback.