Using shapekeys, you get corruptions in other shapes when you undo into a previous editmode session. The "key index" values become invalid. Now, if you have shape keys, entering editmode will clear the previously stored undos.