Probably due to some async interleaving sometimes I see the REPL buffer having a different repl type compared with the code buffer. This means completion is failing with very strange errors.