[Fix #583] Avoid trying to decode the contents of the REPL buffer

I still have no idea what causes this problem, but at least people won't see
the error anymore.