anchor.diff:        // Look for .packages.
         packages = _discoverPackagespec(new Uri.directory(cwd.path));
   
  -      // Fall back to pub list-dir.
  -      if (packages == null) {
  +      if (packages != null) {
  +        packageMap = _getPackageMap(packages);
  +      } else {
  +
  +        // Fall back to pub list-dir.
  +
           PubPackageMapProvider pubPackageMapProvider =
               new PubPackageMapProvider(PhysicalResourceProvider.INSTANCE, sdk);
           PackageMapInfo packageMapInfo =
               pubPackageMapProvider.computePackageMap(cwd);
  -        Map<String, List<fileSystem.Folder>> packageMap =
  -            packageMapInfo.packageMap;
  -        if (packageMap != null) {
  -          resolvers.add(new SdkExtUriResolver(packageMap));
  -          resolvers.add(new PackageMapUriResolver(
  -              PhysicalResourceProvider.INSTANCE, packageMap));
  -        }
  -      }
  -    }
  +        packageMap = packageMapInfo.packageMap;
  +
  +        packageUriResolver = new PackageMapUriResolver(
  +            PhysicalResourceProvider.INSTANCE, packageMap);
  +      }
  +    }
  +
  +    // Now, build our resolver list.
  +
  +    // Custom and 'dart:' URIs come first.
  +    List<UriResolver> resolvers = [
  +      new CustomUriResolver(customUrlMappings),
  +      new DartUriResolver(sdk)
  +    ];
  +
  +    // Next SdkExts.
  +    if (packageMap != null) {
  +      resolvers.add(new SdkExtUriResolver(packageMap));
  +    }
  +
  +    // Then package URIs.
  +    if (packageUriResolver != null) {
  +      resolvers.add(packageUriResolver);
  +    }
  +
  +    // Finally files.
       resolvers.add(new FileUriResolver());
  +
       return new SourceFactory(resolvers, packages);
     }
   
  
positive.code:   /// [SourceFactory] that has been configured accordingly.
    SourceFactory _chooseUriResolutionPolicy(
        CommandLineOptions options, Map<String, String> customUrlMappings) {
      List<UriResolver> resolvers = [
        new CustomUriResolver(customUrlMappings),
        new DartUriResolver(sdk)
      ];
  
      Packages packages;
  
      if (options.packageConfigPath != null) {
        String packageConfigPath = options.packageConfigPath;
        Uri fileUri = new Uri.file(packageConfigPath);
  
negative.code:     }
  
      return null;
    }
  
    Map<String, List<fileSystem.Folder>> _getPackageMap(Packages packages) {
      if (packages == null) {
        return null;
      }
  
      Map<String, List<fileSystem.Folder>> folderMap =
          new Map<String, List<fileSystem.Folder>>();
      packages.asMap().forEach((String path, Uri uri) {
        folderMap[path] = [PhysicalResourceProvider.INSTANCE.getFolder(uri.path)];
      });
      return folderMap;
    }
  
    void _processAnalysisOptions(CommandLineOptions options) {
  