Revert "Make pasting into the REPL much simpler"

This reverts commit 550be1d42d53d9a754c9096aab4f947363ae7909.
Fix #6664 properly