REPL history: keep history dups if the modes are different.