anchor.diff:              end;
           _ when not CanSlide ->
               abort_slide(State, node:pidX(TargetNode), MoveFullId, SourcePid, Tag,
  -                        PredOrSucc, ongoing_slide, true),
  -            State;
  +                        PredOrSucc, ongoing_slide, not First);
           _ when not NodesCorrect ->
               abort_slide(State, node:pidX(TargetNode), MoveFullId, SourcePid, Tag,
  -                        PredOrSucc, wrong_pred_succ_node, true),
  -            State;
  +                        PredOrSucc, wrong_pred_succ_node, not First);
           _ -> % MoveDone, i.e. target id already reached (noop)
               notify_source_pid(SourcePid, {move, result, Tag, ok}),
               State
  
positive.code: %% @doc Returns whether a slide operation is possible, i.e. MySlide is null and
  %%      OtherSlide is either null or not overlapping with TargetId.
  %%      Helper for can_slide_succ/2 and can_slide_pred/2.
  -spec can_slide(MySlide::slide_op:slide_op(), OtherSlide::slide_op:slide_op(), TargetId::?RT:key()) -> boolean().
  can_slide(MySlide, OtherSlide, TargetId) ->
      MySlide =:= null andalso
          (OtherSlide =:= null orelse
  
negative.code:                 _ ->
                      % abort slide but do not notify the other node
                      % (this message should not have been received anyway!)
                      ErrorMsg = io_lib:format("~.0p received for a slide with ~s, but only expected for slides with~s~n",
                                               [MoveMsgTag, PredOrSucc, PredOrSuccExp]),
                      NewState = abort_slide(State, SlideOp, PredOrSucc, {protocol_error, ErrorMsg}, false),
                      log:log(warn, "[ dht_node_move ~.0p ] ~.0p received for a slide with my ~s, but only expected for slides with~s~n"
                                        "(operation: ~.0p)~n", [comm:this(), MoveMsgTag, PredOrSucc, PredOrSuccExp, SlideOp]),
                      NewState
              end;
          not_found ->
              log:log(warn,"[ dht_node_move ~.0p ] ~.0p received with no matching slide operation (ID: ~.0p, slide_pred: ~.0p, slide_succ: ~.0p)~n",
                      [comm:this(), MoveMsgTag, MoveFullId, dht_node_state:get(State, slide_pred), dht_node_state:get(State, slide_succ)]),
              State;
          {wrong_neighbor, Type, SlideOp} -> % wrong pred or succ
              case lists:member(slide_op:get_phase(SlideOp), WorkPhases) of
                  true ->
                      NewState = abort_slide(State, SlideOp, Type, wrong_pred_succ_node, true),
                      log:log(warn,"[ dht_node_move ~.0p ] ~.0p received but ~s changed during move (ID: ~.0p, node(slide): ~.0p, new_~s: ~.0p)~n",
                              [comm:this(), MoveMsgTag, Type, MoveFullId, slide_op:get_node(SlideOp), Type, dht_node_state:get(State, Type)]),
                      NewState;
                  _ -> State
  