anchor.diff:      %% and immediately was awakened.
       %%
       _ = garbage_collect(),
  -    loop_event_handler(P, Debug, S, Event, Events);
  -loop_event(P, Debug, S, Event, Events) ->
  -    loop_event_handler(P, Debug, S, Event, Events).
  -
  -%% Call the state function, eventually
  -%%
  --compile({inline, [loop_event_handler/5]}).
  -loop_event_handler(
  -  P, Debug, #state{state_data = State_Data} = S, Event, Events) ->
       %%
       %% The field 'hibernate' in S is now invalid and will be
       %% restored when looping back to loop/3 or loop_event/5.
       %%
       Q = [Event|Events],
  -    loop_state_callback(P, Debug, S, Q, State_Data, Event).
  +    loop_state_callback(P, Debug, S, Q, S#state.state_data, Event);
  +loop_event(P, Debug, S, Event, Events) ->
  +    %%
  +    %% The field 'hibernate' in S is now invalid and will be
  +    %% restored when looping back to loop/3 or loop_event/5.
  +    %%
  +    Q = [Event|Events],
  +    loop_state_callback(P, Debug, S, Q, S#state.state_data, Event).
   
   %% Make a state enter call to the state function, we loop back here
   %% from further down if state enter calls are enabled
   %%
  +-compile({inline, [loop_state_enter/9]}).
   loop_state_enter(
     P, Debug, #state{state_data = {PrevState,_PrevData}} = S,
     Q, NextState_NewData,
  
positive.code:       CallEnter, StateCall, listify(Actions)).
  %%
  %% Shortcut for no actions
  -compile({inline, [loop_actions/10]}).
  loop_actions(
    P, Debug, S, Q, NextState_NewData,
    NextEventsR, Hibernate, TimeoutsR, Postpone,
  
negative.code: %% since we should not call a state callback, but initialize
  %% loop variables in the same way; compare to
  %% loop_state_callback/6 just below
  -compile({inline, [loop_enter/6]}).
  loop_enter(P, Debug, S, Q, State_Data, Actions) ->
      NextEventsR = [],
      Hibernate = false,
  