Texture paint code was retrieving the evaluated mesh from the original object, which isn't supposed to happen, so the cached mesh isn't properly cleaned up by Edit Mode toggle.
Texture paint code was retrieving the evaluated mesh from the original object, which isn't supposed to happen, so the cached mesh isn't properly cleaned up by Edit Mode toggle.