Fix a bug which causes a user variable or function to be assigned when the expression is invalid and the user presses ENTER.