Template fix for datasets with apps
Merge pull request #344 from thriuin/master

Template fix to handle variable scope in Jinja2 for datasets with apps.