Added temp debugging for flaky shell test.
Fixes #1785

Makes sure that expressions depending on identifiers that might
get overwritten only see the incoming execution context