This is an O(n) operation in the nodes, and needs converting to a map of Guid -> Node.