The first change forces a variable definition to reallocate a new memory slot to avoid corrupting a previously defined one in a loop block. The second change ensures that the frame clone operations obtains a copy of the original data slice, to preserve the original context set in a loop. Fixes #1035.