Fix use of {% set %} statements inside {% if %} blocks.
Merge pull request #68 from fooby/master

Fix for referencing template variables assigned inside {% if  %} blocks