Improvement to handle foreach and anonymous functions