Out of scope variable in jinja2 template started throwing error after i updated to jinja2 2.9

My previously running playbooks starting giving me error after i updated my python modules. After a lot of debugging, i identified the problem. The problem was that following code snippet was working fine until i updated jinja2 to 2.9

`

{% for dictValue in someDictVar -%}
#something something
{% endfor -%}

#This var is used outside its scope. was working earlier but not anymore.
{% if dictValue.someVar is defined -%}

`

So my question is, why was out of scope thing working earlier and why did it start to break in 2.9 ?

You'll probably get a better chance for an answer by asking the Jinja2 project