Fix merge in foreach when query starts with foreach

Chaining SymbolTable between update actions MergePatternBuilder