Fix a crash in the "repl" command

refs #7805