This race condition can occur if a transaction is included in a block right when a notification is being added to the notifier for it AND when the confirmation requires > 1 confirmations. In this case, the confirmation gets added to the confirmation heap twice.