anchor.diff:                  {'$gen_cast',Cast} ->
                       loop_receive_result(P, Debug, S, {cast,Cast});
                   %%
  -		{timeout,TimerRef,TimeoutMsg} ->
  -                    {TimerRefs,TimeoutTypes} = S#state.timers,
  -                    case TimerRefs of
  -                        #{TimerRef := TimeoutType} ->
  +		{timeout,TimerRef,TimeoutType} ->
  +                    case S#state.timers of
  +                        #{TimeoutType := {TimerRef,TimeoutMsg}} = Timers ->
                               %% Our timer
  -                            Timers =
  -                                {maps:remove(TimerRef, TimerRefs),
  -                                 maps:remove(TimeoutType, TimeoutTypes)},
  -                            S_1 = S#state{timers = Timers},
  +                            Timers_1 = maps:remove(TimeoutType, Timers),
  +                            S_1 = S#state{timers = Timers_1},
                               loop_receive_result(
                                 P, Debug, S_1, {TimeoutType,TimeoutMsg});
                           #{} ->
  
positive.code:   Opt,
    [PDict,SysState,Parent,Debug,
     {#params{name = Name} = P,
      #state{
         postponed = Postponed,
         timers = {_TimerRefs, TimeoutTypes}} = S}]) ->
      Header = gen:format_status_header("Status for state machine", Name),
      Log = sys:get_log(Debug),
      [{header,Header},
       {data,
        [{"Status",SysState},
         {"Parent",Parent},
         {"Time-outs",{maps:size(TimeoutTypes),maps:keys(TimeoutTypes)}},
         {"Logged Events",Log},
         {"Postponed",Postponed}]} |
       case format_status(Opt, PDict, update_parent(P, Parent), S) of
  
negative.code:     %% Explicitly separate cases to get separate code paths for when
      %% the map key exists vs. not, since otherwise the external call
      %% to erlang:cancel_timer/1 and to map:remove/2 within
      %% cancel_timer/2 would cause all live registers
      %% to be saved to and restored from the stack also for
      %% the case when the map key TimeoutType does not exist
      case Timers of
          #{TimeoutType := {TimerRef,_TimeoutMsg}} ->
              Timers_1 = cancel_timer(TimeoutType, TimerRef, Timers),
              loop_timeouts(
                P, Debug, S,
                Events, NextState_NewData,
  