add REPL tests for last couple of REPL bugfixes; inspired by @epidemian