According to the doc, {% if %} supports "==" for comparison, but not "=".  The template code might be hiding an error here? Not sure why this works...