fix #6312 (restore old repl history behavior)