editor: improvements to deletion tracking.

Try to catch all the corner cases. I'm sure I've missed some, so let's
leave the warning in here so we can catch them.