anchor.diff:        ConstructorElement element, ast.Arguments arguments) {
       ConstructorElement anchor = null;
       int anchorLifetime = 1;
  +    // Ensure class parameters are considered in scope when following
  +    // redirecting factories.
  +    var classScope = new ClassScope(scope.loader, scope.currentLibrary);
       while (true) {
         if (!element.isConst) {
           return scope
  
positive.code: //   To safely compile code with compile-time errors, we may need a recovery
  //   pass to enforce all kernel invariants before it is given to the backend.
  class ClassBodyBuilder extends GeneralizingAstVisitor<Null> {
    final ExpressionScope scope;
    final ast.Class currentClass;
    final ClassElement element;
    ast.Library get currentLibrary => currentClass.enclosingLibrary;
  
negative.code:       // Update the type arguments inplace on the [arguments] node.
        if (node.redirectedConstructor.type.typeArguments != null) {
          ast.InterfaceType type =
              classScope.buildType(node.redirectedConstructor.type.type);
          var targetClass = scope.getClassReference(element.enclosingElement);
          if (targetClass.typeParameters.length != arguments.types.length) {
            return scope.emitInvalidConstant();
  