code: private final Node registerNode(Node newNode) {
          if(state==State.BUILDING_FAST) {
              return newNode;
          }
          // BUILDING_SMALL
          Node oldNode=nodes.get(newNode);
          if(oldNode!=null) {
              return oldNode;
          }
          // If put() returns a non-null value from an equivalent, previously
          // registered node, then get() failed to find that and we will leak newNode.
          oldNode=nodes.put(newNode, newNode);
          assert(oldNode==null);
          return newNode;
      }
docs: Makes sure that there is only one unique node registered that is
  equivalent to newNode, unless BUILDING_FAST.
  @param newNode Input node. The builder takes ownership.
  @return newNode if it is the first of its kind, or
  an equivalent node if newNode is a duplicate.