Fix REPL bug when same line issued twice.

Reported by lee_++.