don't save repl interaction history when the new item is
a duplicate of the one before

closes PR 12763