Allows MERGE to be used inside FOREACH loops