Fixed the analyzation of variable declarations in for each statements