Fix a race condition with merge and persist and sink adding an event after the sink is no longer valid