Fix a problem with the undo level getting out of step when switching views
with the mouse.