anchor.diff:          true ->
               NestedArchiveStats = archive_api:get_nested_archives_stats(CurrentAipDoc),
               mark_finished(CurrentAipDoc, UserCtx, NestedArchiveStats),
  -            mark_finished(get_archive_doc(DipArchiveCtx), UserCtx, NestedArchiveStats),
  -            {ok, ParentDocOrUndefined} = archive:get_parent_doc(CurrentAipDoc),
  -            ParentDocOrUndefined;
  -        false ->
  -            CurrentAipDoc
  +            {ok, AipParentDocOrUndefined} = archive:get_parent_doc(CurrentAipDoc),
  +            mark_finished(CurrentDipDoc, UserCtx, NestedArchiveStats),
  +            {ok, DipParentDocOrUndefined} = case CurrentDipDoc of
  +                undefined -> {ok, undefined};
  +                _ -> archive:get_parent_doc(CurrentDipDoc)
  +            end,
  +            case {AipParentDocOrUndefined, DipParentDocOrUndefined} of
  +                {undefined, _} -> undefined;
  +                {AipParentDoc, DipParentDocOrUndefined} ->
  +                    ParentAipArchiveCtx = AipArchiveCtx#archive_ctx{current_archive_doc = AipParentDoc},
  +                    case DipParentDocOrUndefined of
  +                        undefined ->
  +                            TraverseInfo#{
  +                                aip_ctx => ParentAipArchiveCtx
  +                            };
  +                        DipParentDoc ->
  +                            TraverseInfo#{
  +                                aip_ctx => ParentAipArchiveCtx,
  +                                dip_ctx => DipArchiveCtx#archive_ctx{current_archive_doc = DipParentDoc}
  +                            }
  +                    end
  +            end;
  +        false ->
  +            TraverseInfo
       end.
   
   
  
positive.code:     scheduled_dataset_root_guid := ScheduledDatasetRootGuid,
      aip_ctx := AipArchiveCtx,
      dip_ctx := DipArchiveCtx
  }) ->
      CurrentAipDoc = get_archive_doc(AipArchiveCtx),
      {ok, CurrentArchiveRootGuid} = archive:get_dataset_root_file_guid(CurrentAipDoc),
      {ok, Config} = archive:get_config(CurrentAipDoc),
      CreateNestedArchives = archive_config:should_create_nested_archives(Config),
  
negative.code: 
  -spec mark_finished_and_propagate_up(file_ctx:ctx(), user_ctx:ctx(), info(), id()) -> ok.
  mark_finished_and_propagate_up(CurrentFileCtx, UserCtx, TraverseInfo, TaskId) ->
      NextTraverseInfoOrUndefined = 
          mark_finished_if_current_archive_is_rooted_in_current_file(CurrentFileCtx, UserCtx, TraverseInfo),
      case NextTraverseInfoOrUndefined of
          undefined ->
              ok;
          NextTraverseInfo ->
              propagate_up(CurrentFileCtx, UserCtx, NextTraverseInfo, TaskId)
      end.
  
  
  