Fix bug with backspace after spell correction undo

Before this commit, a backspace that triggers an undo action would
create a neverending loop because the last_action() is always an "undo"
one.