anchor.diff:  				  end;
   			      _ -> TmpAcc
   			  end
  -		  end, [], Fields),
  -    resolve_types (Tail, AllPaths, Enums, [{type_path_to_type (TypePath), lists:reverse (FieldsOut) } | Acc]);
  +		end,
  +    FieldsOut = lists:foldl(FolderFun, [], Fields),
  +    ExtendedOut = case Extended of
  +        disallowed ->
  +            disallowed;
  +        _ ->
  +            MidExtendOut = lists:foldl(FolderFun, [], Extended),
  +            lists:reverse(MidExtendOut)
  +    end,
  +    resolve_types (Tail, AllPaths, Enums, [{type_path_to_type (TypePath), lists:reverse (FieldsOut), ExtendedOut } | Acc]);
   resolve_types ([], _, _, Acc) ->
       Acc.
   
  
positive.code:     false;
  find_type ([Type | TailTypes], KnownTypes) ->
      case lists:keysearch (Type, 1, KnownTypes) of
  	false ->
  	    find_type (TailTypes, KnownTypes);
  	{value, {RealType, _}} ->
  	    RealType
      end.
  
  %% @hidden
  
negative.code:     {function,Line,to_record,2,[filter_to_record_clause(Msg, Clause) || Msg <- Msgs]}.
  
  %% @hidden
  filter_to_record_clause({MsgName, _, _}, {clause,L,[_Param1,Param2],Guards,[Fold]}) ->
      Fold1 = replace_atom(Fold, pikachu, atomize(MsgName)),
      {clause,L,[{atom,L,atomize(MsgName)},Param2],Guards,[Fold1]}.
  
  