Fix race condition in trie download from multiple peers