anchor.diff:                  {ok, {Start, Path}} ->
                       % our unflushed doc is a leaf node. Go back on the path
                       % to find the previous rev that's on disk.
  -                    
  +
                       LoadPrevRevFun = fun() ->
                                   make_first_doc_on_disk(Db,Id,Start-1, tl(Path))
                               end,
  -                    
  +
                       case couch_doc:has_stubs(Doc) of
                       true ->
                           DiskDoc = LoadPrevRevFun(),
  
positive.code:                 {[Doc | DocsAcc], NonRepDocsAcc}
              end
          end, {[], []}, Docs),
          
      DocBuckets = group_alike_docs(Docs2),
  
      case (Db#db.validate_doc_funs /= []) orelse
  
negative.code:                         Doc2 = Doc,
                          GetDiskDocFun = LoadPrevRevFun
                      end,
  
                      case validate_doc_update(Db, Doc2, GetDiskDocFun) of
                      ok ->
                          {[Doc2 | AccValidated], AccErrors2};
  