This is a backport of [[https://github.com/bitcoin/bitcoin/pull/21188 | core#21188]]
Bitcoin ABC has one additional occurence of duplicated lock annotations (D9044 for `ProcessOrphanTx`) and two occurences that were already deduplicated (D11435 for `TipMayBeStale` and D11437 for `MaybeSetPeerAsAnnouncingHeaderAndIDs`).