anchor.diff:      }
       Set<String> libraryUris = uriToNode.keys.toSet();
       // Perform linking.
  -    bool failed = false;
       Map<String, LinkedLibraryBuilder> linkedLibraries =
           link(libraryUris, (String absoluteUri) {
         LinkedLibrary dependencyLibrary = store.linkedMap[absoluteUri];
         if (dependencyLibrary == null) {
  -        failed = true;
  +        scc.forEach((node) => node.failed = true);
  +        throw new _LinkException();
         }
         return dependencyLibrary;
       }, (String absoluteUri) {
         UnlinkedUnit unlinkedUnit = store.unlinkedMap[absoluteUri];
         if (unlinkedUnit == null) {
  -        failed = true;
  +        scc.forEach((node) => node.failed = true);
  +        throw new _LinkException();
         }
         return unlinkedUnit;
       }, strong);
       // Assemble linked bundles and put them into the store.
  -    if (!failed) {
  -      for (_LinkedNode node in scc) {
  -        PackageBundleAssembler assembler = new PackageBundleAssembler();
  -        linkedLibraries.forEach((uri, linkedLibrary) {
  -          if (identical(uriToNode[uri], node)) {
  -            assembler.addLinkedLibrary(uri, linkedLibrary);
  -          }
  -        });
  -        node.linkedBuilder = assembler.assemble();
  -        store.addBundle(null, node.linkedBuilder);
  -      }
  -    } else {
  -      scc.forEach((node) => node.failed = true);
  +    for (_LinkedNode node in scc) {
  +      PackageBundleAssembler assembler = new PackageBundleAssembler();
  +      linkedLibraries.forEach((uri, linkedLibrary) {
  +        if (identical(uriToNode[uri], node)) {
  +          assembler.addLinkedLibrary(uri, linkedLibrary);
  +        }
  +      });
  +      node.linkedBuilder = assembler.assemble();
  +      store.addBundle(null, node.linkedBuilder);
       }
     }
   }
  +
  +/**
  + * This exception is thrown during linking as a signal that linking of the
  + * current bundle cannot be performed, e.g. when a dependency cannot be found.
  + */
  +class _LinkException {}
  
positive.code:     }
  
      // Link each package node.
      for (_LinkedNode node in nodes) {
        if (!node.isEvaluated) {
          bool strong = context.analysisOptions.strongMode;
          new _LinkedWalker(store, strong).walk(node);
        }
      }
  
      // Create successfully linked packages.
      List<LinkedPubPackage> linkedPackages = <LinkedPubPackage>[];
  
negative.code: 
    @override
    List<_LinkedNode> computeDependencies() {
      if (failed) {
        return const <_LinkedNode>[];
      }
  
      Set<_LinkedNode> dependencies = new Set<_LinkedNode>();
  
      void appendDependency(String uriStr) {
  