anchor.diff:      false -> DeclType
     end.
   
  -record_from_form({atom, _, Name}, ModFields, S, D, L, C) ->
  +record_from_form({atom, _, Name}, ModFields, S, D0, L0, C) ->
     #from_form{site = Site, mrecs = MR, tnames = TypeNames} = S,
  -  case can_unfold_more({record, Name}, TypeNames) of
  +  RecordType = {record, Name},
  +  case can_unfold_more(RecordType, TypeNames) of
       true ->
         M = site_module(Site),
         {ok, R} = dict:find(M, MR),
         case lookup_record(Name, R) of
           {ok, DeclFields} ->
  -          NewTypeNames = [{record, Name}|TypeNames],
  +          NewTypeNames = [RecordType|TypeNames],
             Site1 = {record, {M, Name, length(DeclFields)}},
             S1 = S#from_form{site = Site1, tnames = NewTypeNames},
  -          {GetModRec, L1, C1} =
  -            get_mod_record(ModFields, DeclFields, S1, D, L, C),
  -          case GetModRec of
  -            {error, FieldName} ->
  -              throw({error, io_lib:format("Illegal declaration of #~w{~w}\n",
  -                                          [Name, FieldName])});
  -            {ok, NewFields} ->
  -              S2 = S1#from_form{vtab = var_table__new()},
  -              {NewFields1, L2, C2} =
  -                fields_from_form(NewFields, S2, D, L1, C1),
  -              Rec = t_tuple(
  -                      [t_atom(Name)|[Type
  -                                     || {_FieldName, Type} <- NewFields1]]),
  -              {Rec, L2, C2}
  -          end;
  +          Fun = fun(D, L) ->
  +                    {GetModRec, L1, C1} =
  +                      get_mod_record(ModFields, DeclFields, S1, D, L, C),
  +                    case GetModRec of
  +                      {error, FieldName} ->
  +                        throw({error,
  +                               io_lib:format("Illegal declaration of #~w{~w}\n",
  +                                             [Name, FieldName])});
  +                      {ok, NewFields} ->
  +                        S2 = S1#from_form{vtab = var_table__new()},
  +                        {NewFields1, L2, C2} =
  +                          fields_from_form(NewFields, S2, D, L1, C1),
  +                        Rec = t_tuple(
  +                                [t_atom(Name)|[Type
  +                                               || {_FieldName, Type} <- NewFields1]]),
  +                        {Rec, L2, C2}
  +                    end
  +                end,
  +          recur_limit(Fun, D0, L0, RecordType, TypeNames);
           error ->
             throw({error, io_lib:format("Unknown record #~w{}\n", [Name])})
         end;
       false ->
  -       {t_any(), L, C}
  +       {t_any(), L0, C}
     end.
   
   get_mod_record([], DeclFields, _S, _D, L, C) ->
  
positive.code:      true -> {K, ?mand, V};
       false -> E
     end|promote_to_mand(MKs, T)].
  
  -spec t_check_record_fields(parse_form(), sets:set(mfa()), site(),
                              mod_records(), var_table(), cache()) -> cache().
  
negative.code:           List = lists:zip(ArgNames, ArgTypes),
            TmpVarTab = maps:from_list(List),
            S2 = S1#from_form{site = RemType, vtab = TmpVarTab},
            Fun = fun(DD, LL) -> from_form(Form, S2, DD, LL, C1) end,
            {NewType, L3, C3} =
              case Tag of
                type ->
                  recur_limit(Fun, D, L1, RemType, TypeNames);
                opaque ->
                  {NewRep, L2, C2} = recur_limit(Fun, D, L1, RemType, TypeNames),
                  NewRep1 = choose_opaque_type(NewRep, Type),
                  NewRep2 =
                    case cannot_have_opaque(NewRep1, RemType, TypeNames) of
  