Most events don't set a target-page (only edit-user-talk, page-linked and Flow events do), because setting it causes notifications to be marked as read when that page is visited. However, when moderating/unmoderating events on page deletion/undeletion, we only look at echo_target_page, which is incomplete. Events of types that don't use echo_target_page but that refer to a deleted page will eventually get moderated when they fail to format, but this causes count glitches, and means they won't get unmoderated when the page is undeleted.
To fix this, we should use event_page_id instead of echo_target_page for moderation. There's already an index on it. We could then also uncomment this code deleting echo_target_page rows when a notification is marked as read.