Replaced hash set with identity hash set for catching cyclical graphs in
ReferenceTraversalIterator.