Fix the REPL input state not resetting fully on runtime errors