anchor.diff:          coreLibrary = library;
           target.loadExtraRequiredLibraries(this);
         }
  +      if (library.loader != this) {
  +        // This library isn't owned by this loader, so not further processing
  +        // should be attempted.
  +        return library;
  +      }
  +
  +      {
  +        // Add any additional logic after this block. Setting the
  +        // firstSourceUri and first library should be done as early as
  +        // possible.
  +        firstSourceUri ??= uri;
  +        first ??= library;
  +      }
         if (target.backendTarget.mayDefineRestrictedType(uri)) {
           library.mayImplementRestrictedTypes = true;
         }
         if (uri.scheme == "dart") {
           target.readPatchFiles(library);
         }
  -      first ??= library;
  -      if (library.loader == this) {
  -        unparsedLibraries.addLast(library);
  -      }
  +      unparsedLibraries.addLast(library);
         return library;
       });
       if (accessor != null &&
  
positive.code: 
    LibraryBuilder coreLibrary;
  
    LibraryBuilder first;
  
    int byteCount = 0;
  
negative.code:   /// compile-time error.
    LibraryBuilder read(Uri uri, int charOffset,
        {Uri fileUri, LibraryBuilder accessor, bool isPatch: false}) {
      LibraryBuilder builder = builders.putIfAbsent(uri, () {
        if (fileUri == null) {
          switch (uri.scheme) {
  