When the BlockManager checks for blocks, it can find the same block twice, e.g. a user account block that is also referenced in the block cookie. These duplicates are not always filtered out properly, which can result in a confusing message, such as reported in T225872.
BlockManager:::getUserBlock needs a filtering step to ensure that blocks with the same ID are not duplicated.
(Autoblocks do not have the same ID as their parent block, but they are already filtered out by DatabaseBlock::newLoad.)