Fixes #394 - Identifiers inside of FOREACH get the wrong type
Merge pull request #411 from systay/394

Fixes #394 - Identifiers inside of FOREACH get the wrong type