anchor.diff:  
   %%------------------------------------------------------------------------------
   
  -has_more_to_explore(State) ->
  -  #scheduler_state{exploring = N, logger = Logger, trace = Trace} = State,
  +has_more_to_explore(#scheduler_state{trace = Trace} = State) ->
     TracePrefix = find_prefix(Trace, State),
     case TracePrefix =:= [] of
       true -> {false, State#scheduler_state{trace = []}};
       false ->
  -      S = io_lib:format("New interleaving ~p. Replaying...", [N]),
  -      ?time(Logger, S),
  -      NewState = replay_prefix(TracePrefix, State),
  -      ?debug(Logger, "~s~n",["Replay done."]),
  -      FinalState = NewState#scheduler_state{trace = TracePrefix},
  -      {true, FinalState}
  -  end.
  -
  -find_prefix([], _State) -> [];
  +      NewState =
  +        State#scheduler_state{need_to_replay = true, trace = TracePrefix},
  +      {true, NewState}
  +  end.
  +
   find_prefix([#trace_state{wakeup_tree = []}|Rest], State) ->
     find_prefix(Rest, State);
  -find_prefix([#trace_state{graph_ref = Sibling} = Other|Rest], State) ->
  -  #scheduler_state{logger = Logger} = State,
  -  [#trace_state{graph_ref = Parent}|_] = Rest,
  +find_prefix(Trace, _State) -> Trace.
  +
  +replay(#scheduler_state{need_to_replay = false} = State) ->
  +  State;
  +replay(State) ->
  +  #scheduler_state{exploring = N, logger = Logger, trace = Trace} = State,
  +  [#trace_state{graph_ref = Sibling} = Last|
  +   [#trace_state{graph_ref = Parent}|_] = Rest] = Trace,
     concuerror_logger:graph_set_node(Logger, Parent, Sibling),
  -  [Other#trace_state{graph_ref = make_ref(), clock_map = dict:new()}|Rest].
  -
  +  NewTrace =
  +    [Last#trace_state{graph_ref = make_ref(), clock_map = dict:new()}|Rest],
  +  S = io_lib:format("New interleaving ~p. Replaying...", [N]),
  +  ?time(Logger, S),
  +  NewState = replay_prefix(NewTrace, State#scheduler_state{trace = NewTrace}),
  +  ?debug(Logger, "~s~n",["Replay done."]),
  +  NewState#scheduler_state{need_to_replay = false}.
   
   %% =============================================================================
   %% ENGINE (manipulation of the Erlang processes under the scheduler)
  
positive.code:             catch
                _:_ ->
                  #scheduler_state{print_depth = PrintDepth} = State,
                  Reason =
                    {replay_mismatch, I, Event, element(2, NewEvent), PrintDepth},
                  ?crash(Reason)
  
negative.code:           logger                       :: pid(),
            last_scheduled               :: pid(),
            message_info                 :: message_info(),
            need_to_replay     = false   :: boolean(),
            non_racing_system  = []      :: [atom()],
            optimal            = true    :: boolean(),
            previous_was_enabled = true   :: boolean(),
  