anchor.diff:  	     {bad_action_from_state_function,Action},
   	     ?STACKTRACE()};
   	{timeout,infinity,_} ->
  -	    %% Ignore - timeout will never happen and already cancelled
  +	    %% Ignore - timeout will never happen and is already cancelled
   	    parse_actions(
   	      Debug, S, State, Actions,
   	      Hibernate, TimeoutsR, Postpone, NextEventsR);
  
positive.code:     end.
  
  loop_receive_result(
    Parent, Debug, #{state := State} = S, Hibernate, Event) ->
      %% From now the 'hibernate' field in S is invalid
      %% and will be restored when looping back
      %% in loop_event_result/11
      NewDebug = sys_debug(Debug, S, State, {in,Event}),
      %% Here is the queue of not yet handled events created
      Events = [],
      loop_event(Parent, NewDebug, S, Events, Event, Hibernate).
  
  %% Entry point for handling an event, received or enqueued
  loop_event(
    Parent, Debug,
    #{state := State, data := Data, timer_types := TimerTypes,
      cancel_timers := CancelTimers} = S_0,
    Events, {Type,Content} = Event, Hibernate) ->
      %%
      %% If (this old) Hibernate is true here it can only be
  
negative.code: 	#{} ->
  	    %% Unseen type - handle
  	    NewSeen = Seen#{TimerType => true},
  	    if
  		TimerType =:= timeout ->
  		    %% Handle event timer later
  		    parse_timers(
  		      TimerRefs, TimerTypes, CancelTimers, TimeoutsR,
  		      NewSeen, [Timeout|TimeoutEvents]);
  		Time =:= infinity ->
  		    %% Cancel any running timer
  		    {NewTimerTypes,NewCancelTimers} =
  			cancel_timer_by_type(
  			  TimerType, TimerTypes, CancelTimers),
  		    parse_timers(
  		      TimerRefs, NewTimerTypes, NewCancelTimers, TimeoutsR,
  		      NewSeen, TimeoutEvents);
  		Time =:= 0 ->
  		    %% Cancel any running timer
  		    {NewTimerTypes,NewCancelTimers} =
  			cancel_timer_by_type(
  			  TimerType, TimerTypes, CancelTimers),
  		    %% Handle zero time timeouts later
  		    TimeoutEvent = {TimerType,TimerMsg},
  		    parse_timers(
  		      TimerRefs, NewTimerTypes, NewCancelTimers, TimeoutsR,
  		      NewSeen, [TimeoutEvent|TimeoutEvents]);
  		true ->
  		    %% (Re)start the timer
  		    TimerRef =
  			erlang:start_timer(Time, self(), TimerMsg),
  		    case TimerTypes of
  			#{TimerType := OldTimerRef} ->
  			    %% Cancel the running timer
  			    cancel_timer(OldTimerRef),
  			    %% Insert the new timer into
  			    %% both TimerRefs and TimerTypes
  			    parse_timers(
  			      TimerRefs#{TimerRef => TimerType},
  			      TimerTypes#{TimerType => TimerRef},
  			      CancelTimers + 1,
  			      TimeoutsR, NewSeen, TimeoutEvents);
  			#{} ->
  			    parse_timers(
  			      TimerRefs#{TimerRef => TimerType},
  			      TimerTypes#{TimerType => TimerRef},
  			      CancelTimers,
  			      TimeoutsR, NewSeen, TimeoutEvents)
  		    end
  	    end
      end.
  
  