anchor.diff:      if (name == null) {
         return typeRef;
       } else {
  -      int typeId = typeRef.reference;
  -      LinkedReference typeLinkedRef = serializer.linkedReferences[typeId];
  -      serializer.unlinkedReferences.add(new UnlinkedReferenceBuilder(
  -          name: name.name, prefixReference: typeId));
  -      int refId = serializer.linkedReferences.length;
  -      serializer.linkedReferences.add(new LinkedReferenceBuilder(
  -          kind: ReferenceKind.constructor, unit: typeLinkedRef.unit));
  +      LinkedReference typeLinkedRef =
  +          serializer.linkedReferences[typeRef.reference];
  +      int refId = serializer.serializeUnlinkedReference(
  +          name.name, ReferenceKind.constructor,
  +          prefixReference: typeRef.reference, unit: typeLinkedRef.unit);
         return new EntityRefBuilder(
             reference: refId, typeArguments: typeRef.typeArguments);
       }
  
positive.code:     // the element model.  For the moment we use a name that can't possibly
      // ever exist.
      if (unresolvedReferenceIndex == null) {
        assert(unlinkedReferences.length == linkedReferences.length);
        unresolvedReferenceIndex = unlinkedReferences.length;
        unlinkedReferences
            .add(new UnlinkedReferenceBuilder(name: '*unresolved*'));
        linkedReferences
            .add(new LinkedReferenceBuilder(kind: ReferenceKind.unresolved));
      }
      return unresolvedReferenceIndex;
    }
  
negative.code:   }
  
    /**
     * Create a new entry in the references table ([UnlinkedLibrary.references]
     * and [LinkedLibrary.references]) representing an entity having the given
     * [name] and [kind].  If [unit] is given, it is the index of the compilation
     * unit containing the entity being referred to.  If [prefixReference] is
     * given, it indicates the entry in the references table for the prefix.
     */
    int serializeUnlinkedReference(String name, ReferenceKind kind,
        {int unit: 0, int prefixReference: 0}) {
      assert(unlinkedReferences.length == linkedReferences.length);
      int index = unlinkedReferences.length;
      unlinkedReferences.add(new UnlinkedReferenceBuilder(
          name: name, prefixReference: prefixReference));
      linkedReferences.add(new LinkedReferenceBuilder(kind: kind, unit: unit));
      return index;
    }
  
    /**
     * Return the index of the entry in the references table
     * ([UnlinkedLibrary.references] and [LinkedLibrary.references]) used for
     * unresolved references.  A new entry is added to the table if necessary to
  