WL-3594 Don’t include events for deleted entities.

For deleted entities the only event we want to include is it’s deletion so we skip all others.
I think I just cleaned up the trailing whitespace as it's in the block that's changed.