A Bitcoin client has to download the whole blockchain from the P2P network in order to become a full node.
A full node is able to determine, if a transaction in the network is valid or not.
To download the blockchain, the client queries other peers in the network for more blocks by providing them with the hash of the last block it has currently in its downloaded blockchain.
The other nodes search in their currently best blockchain for the specified hash and return a list of hashes of further blocks the client can download.
After the client determines that the further block hashes are indeed in the longest block chain by crossvalidating other nodes, it requests those blocks from its peers by giving them the hashes of those new blocks.
After the download, it checks for itself that the blocks follow the rules of the bitcoin network and inserts them in its current blockchain.
This algorithm assumes that any valid block in the blockchain has a unique hash that identifies it. What happens, if by chance a block is inserted in the blockchain that has the same hash as a previous block and that complies with all rules of the bitcoin network?
Wouldn't that break the algorithm?