anchor.diff:    /// Procedures.
     void buildFunctionNode(ir.FunctionNode functionNode) {
       openFunction();
  +    if (functionNode.parent is ir.Procedure &&
  +        (functionNode.parent as ir.Procedure).kind ==
  +            ir.ProcedureKind.Factory) {
  +      _addClassTypeVariablesIfNeeded(functionNode.parent);
  +    }
       functionNode.body.accept(this);
       closeFunction();
     }
  
positive.code:   /// constructor bodies for all constructors in the hierarchy.
    void buildConstructor(ir.Constructor constructor) {
      openFunction();
  
      // Collect field values for the current class.
      // TODO(het): Does kernel always put field initializers in the constructor
  
negative.code:     return result;
    }
  
    void _addClassTypeVariablesIfNeeded(ir.Member constructor) {
      var enclosing = astAdapter.getElement(constructor).enclosingElement;
      if (backend.classNeedsRti(enclosing)) {
        enclosing.typeVariables.forEach((TypeVariableType typeVariable) {
          HParameterValue param =
              addParameter(typeVariable.element, commonMasks.nonNullType);
          localsHandler.directLocals[
              localsHandler.getTypeVariableAsLocal(typeVariable)] = param;
        });
      }
    }
  
    /// Builds generative constructors.
    ///
    /// Generative constructors are built in two stages.
  