anchor.diff:  
           if (superclasses == null) {
             superclasses = <Class>{};
  -          void collectSupertypes(Class c) {
  -            if (!superclasses.add(c)) return;
  +          void collectSupertypes(Class c, Set<Class> supers) {
  +            if (!supers.add(c)) return;
               var s = c.superclass;
  -            if (s != null) collectSupertypes(s);
  +            if (s != null) collectSupertypes(s, supers);
               var m = c.mixedInClass;
  -            if (m != null) collectSupertypes(m);
  +            if (m != null) collectSupertypes(m, supers);
             }
   
  -          collectSupertypes(class_);
  +          collectSupertypes(class_, superclasses);
             superclasses.remove(class_);
             superclasses.removeWhere((s) => s.enclosingLibrary != library);
           }
  
positive.code: // for details. All rights reserved. Use of this source code is governed by a
  // BSD-style license that can be found in the LICENSE file.
  
  // @dart = 2.9
  
  import 'dart:collection' show HashMap, HashSet, Queue;
  
  import 'package:kernel/core_types.dart';
  import 'package:kernel/kernel.dart';
  import 'package:kernel/type_environment.dart';
  
negative.code:         HashMap.fromIterables(allClasses, allClasses.map(getInstanceFieldMap));
  
      for (var class_ in allClasses) {
        Set<Class>? superclasses;
  
        // Visit accessors in the current class, and see if they override an
        // otherwise private field.
  