Something terrible happened behind the scenes in VE, see bug 52982. When I tried to undo, the glitch-induced changes were not reverted, and it's possible that the undo algorithm was responsible for further damage to the document.
I would review how operations are being stored in the stack. Are there content checksums, or other error-checking measures such as absolute diff position? It might be feasible to store entire copies of the page content as savepoints.
Version: unspecified
Severity: normal