Error when using empty namespace for disambiguation at REPL

Fixes #1497.