--TEST-- "for" tag adds a loop variable to the context locally --TEMPLATE-- {% for item in items %} {% endfor %} {% if loop is not defined %}WORKS{% endif %} --DATA-- return ['items' => []] --EXPECT-- WORKS