Isn't the whole point of a replaceable event that it should be replaced (by the most recent one)? See NIP-01 (only the latest event MUST be stored, older versions MAY be discarded)
Correct, but this bug was removing ALL records on DB with exception of the most recent one 😅
You mean, events with different a-tags / kind numbers? That would be a (serious) bug