[WIP] Emit deletes safe so they correspond to create events.

See https://codio.myjetbrains.com/youtrack/issue/codio-3974