anchor.diff:      }
       if (extended == null) return list;
   
  -    return new SelectorList(
  -        _trim(extended).where((complex) => complex != null));
  +    return new SelectorList(_trim(extended, _originals.contains)
  +        .where((complex) => complex != null));
     }
   
     /// Extends [complex] using [extensions], and returns the contents of a
  
positive.code:           .toList();
      });
  
      return _trim(unifiedPaths.where((complexes) => complexes != null).toList());
    }
  
    Iterable<List<Extension>> _extendSimple(
  
negative.code:     // This could be written more simply using [List.map], but we want to avoid
      // any allocations in the common case where no extends apply.
      List<List<ComplexSelector>> extendedNotExpanded;
      var isOriginal = _originals.contains(complex);
      for (var i = 0; i < complex.components.length; i++) {
        var component = complex.components[i];
        if (component is CompoundSelector) {
          var extended = _extendCompound(component, extensions, mediaQueryContext,
              inOriginal: isOriginal, replace: replace);
          if (extended == null) {
            extendedNotExpanded?.add([
              new ComplexSelector([component])
  