Add REPL scoping tests