anchor.diff:      }
     }
   
  -  void promoteToBodyLevel(ast.Class classNode) {
  +  void promoteToBodyLevel(ast.Class classNode, ClassElement element,
  +      NamedCompilationUnitMember astNode) {
       if (classNode.level == ast.ClassLevel.Body) return;
       promoteToHierarchyLevel(classNode);
       classNode.level = ast.ClassLevel.Body;
  -    var element = getClassElement(classNode);
  -    if (element == null) return;
  -    var astNode = element.computeNode();
       // Clear out the member references that were put in the class.
       // The AST builder will load them all put back in the right order.
       classNode..fields.clear()..procedures.clear()..constructors.clear();
  
positive.code:       ..fileUri = "file://${element.source.fullName}";
    }
  
    void _buildTopLevelMember(ast.Member member, Element element) {
      var astNode = element.computeNode();
      assert(member.parent != null);
      new MemberBodyBuilder(this, member, element).build(astNode);
    }
  
negative.code:     return _libraryBeingLoaded == element;
    }
  
    void _buildLibraryBody(LibraryElement element, ast.Library library,
        List<CompilationUnit> units) {
      assert(_libraryBeingLoaded == null);
      _libraryBeingLoaded = element;
      var classes = <ast.Class>[];
      var procedures = <ast.Procedure>[];
      var fields = <ast.Field>[];
  
      void loadClass(NamedCompilationUnitMember declaration) {
        // [declaration] can be a ClassDeclaration, EnumDeclaration, or a
        // ClassTypeAlias.
        ClassElement element = declaration.element;
        var node = getClassReference(element);
        promoteToBodyLevel(node, element, declaration);
        classes.add(node);
      }
  
      void loadProcedure(FunctionDeclaration declaration) {
        var element = declaration.element;
        var node = getMemberReference(element);
        _buildTopLevelMember(node, element, declaration);
        procedures.add(node);
      }
  
      void loadField(TopLevelVariableDeclaration declaration) {
        for (var field in declaration.variables.variables) {
          var element = field.element;
          // Ignore fields inserted through error recovery.
          if (element.name == '') continue;
          var node = getMemberReference(element);
          _buildTopLevelMember(node, element, field);
          fields.add(node);
        }
      }
  
      for (var unit in units) {
        for (CompilationUnitMember declaration in unit.declarations) {
          if (declaration is ClassDeclaration ||
              declaration is EnumDeclaration ||
              declaration is ClassTypeAlias) {
            loadClass(declaration);
          } else if (declaration is FunctionDeclaration) {
            loadProcedure(declaration);
          } else if (declaration is TopLevelVariableDeclaration) {
            loadField(declaration);
          } else if (declaration is FunctionTypeAlias) {
            // Nothing to do. Typedefs are handled lazily while constructing type
            // references.
          } else {
            throw "unexpected node: ${declaration.runtimeType} $declaration";
          }
        }
      }
  