Fixes #1829. Preserve variable scope in the REPL
Merge pull request #2814 from epidemian/issue1829

Fixes #1829. Preserve variable scope in the REPL