Identifiers introduced outside of FOREACH should be in scope inside FOREACH