Fixed compile bug: support for empty foreach tag.
Hoist variable declarations from foreach tag to global datamodel scope.
Fixes #155
Merge pull request #159 from jbeard4/issue-155

Fixes Issue 155