anchor.diff:  
   %% Interpret all callback return variants
   parse_event_result(
  -  AllowStateChange, Debug, S, Result, Events, Event, State, Data) ->
  +  AllowStateChange, Debug, S, TimerRefs, TimerTypes,
  +  Events, Event, State, Data, Hibernate, Result) ->
       case Result of
   	stop ->
   	    terminate(
  -	      exit, normal, ?STACKTRACE(), Debug, S, [Event|Events]);
  +	      exit, normal, ?STACKTRACE(), Debug,
  +	      S#{
  +		timer_refs := TimerRefs,
  +		timer_types := TimerTypes,
  +		hibernate := Hibernate},
  +	      [Event|Events]);
   	{stop,Reason} ->
   	    terminate(
  -	      exit, Reason, ?STACKTRACE(), Debug, S, [Event|Events]);
  +	      exit, Reason, ?STACKTRACE(), Debug,
  +	      S#{
  +		timer_refs := TimerRefs,
  +		timer_types := TimerTypes,
  +		hibernate := Hibernate},
  +	      [Event|Events]);
   	{stop,Reason,NewData} ->
   	    terminate(
  -	      exit, Reason, ?STACKTRACE(),
  -	      Debug, S#{data := NewData}, [Event|Events]);
  +	      exit, Reason, ?STACKTRACE(), Debug,
  +	      S#{
  +		data := NewData,
  +		timer_refs := TimerRefs,
  +		timer_types := TimerTypes,
  +		hibernate := Hibernate},
  +	      [Event|Events]);
   	%%
   	{stop_and_reply,Reason,Replies} ->
   	    Q = [Event|Events],
   	    reply_then_terminate(
  -	      exit, Reason, ?STACKTRACE(),
  -	      Debug, S, Q, Replies);
  +	      exit, Reason, ?STACKTRACE(), Debug,
  +	      S#{
  +		timer_refs := TimerRefs,
  +		timer_types := TimerTypes,
  +		hibernate := Hibernate},
  +	      Q, Replies);
   	{stop_and_reply,Reason,Replies,NewData} ->
   	    Q = [Event|Events],
   	    reply_then_terminate(
  -	      exit, Reason, ?STACKTRACE(),
  -	      Debug, S#{data := NewData}, Q, Replies);
  +	      exit, Reason, ?STACKTRACE(), Debug,
  +	      S#{
  +		data := NewData,
  +		timer_refs := TimerRefs,
  +		timer_types := TimerTypes,
  +		hibernate := Hibernate},
  +	      Q, Replies);
   	%%
   	{next_state,State,NewData} ->
   	    {NewData,State,[],false};
  
positive.code: 
  %% Entry point for wakeup_from_hibernate/3
  loop_receive(
    Parent, Debug, #{timer_refs := TimerRefs, timer_types := TimerTypes} = S) ->
      receive
  	Msg ->
  	    case Msg of
  		{system,Pid,Req} ->
  		    #{hibernate := Hibernate} = S,
  		    %% Does not return but tail recursively calls
  		    %% system_continue/3 that jumps to loop/3
  		    sys:handle_system_msg(
  		      Req, Pid, Parent, ?MODULE, Debug, S, Hibernate);
  		{'EXIT',Parent,Reason} = EXIT ->
  		    %% EXIT is not a 2-tuple and therefore
  		    %% not an event and has no event_type(),
  		    %% but this will stand out in the crash report...
  		    terminate(
  		      exit, Reason, ?STACKTRACE(), Debug, S, [EXIT]);
  		{timeout,TimerRef,TimerMsg} ->
  		    case TimerRefs of
  			#{TimerRef := TimerType} ->
  
negative.code: %% Server helpers
  
  reply_then_terminate(
    Class, Reason, Stacktrace, Debug,
    #{state := State} = S, Q, Replies) ->
      if
  	is_list(Replies) ->
  	    do_reply_then_terminate(
  	      Class, Reason, Stacktrace, Debug,
  	      S, Q, Replies, State);
  	true ->
  	    do_reply_then_terminate(
  	      Class, Reason, Stacktrace, Debug,
  	      S, Q, [Replies], State)
      end.
  %%
  do_reply_then_terminate(
  