Fixed undoing delete/backspace in overwrite mode.

Temporarily turn off overwrite mode in order to correctly insert the character being restored.