Handle indexVariable in foreach, this fixes #14
Because any foreach based on iter will be wrapped
as while, this commit should work.