Change the way the repl updates it's state on a error

All declaration of modules and type/exception long identifiers need to
be kept. And the inferencer should not update it's environments for
lexically scoped names. Down to 1 cheat in replCorrect