anchor.diff:      handle_message({ok, [X || _D <- Docs]}, Worker, Acc0);
   handle_message({bad_request, Msg}, _, _) ->
       throw({bad_request, Msg}).
  +
  +tag_docs([]) ->
  +    [];
  +tag_docs([#doc{meta=Meta}=Doc | Rest]) ->
  +    [Doc#doc{meta=[{ref, make_ref()} | Meta]} | tag_docs(Rest)].
  +
  +untag_docs([]) ->
  +    [];
  +untag_docs([#doc{meta=Meta}=Doc | Rest]) ->
  +    [Doc#doc{meta=lists:keydelete(ref, 1, Meta)} | untag_docs(Rest)].
   
   force_reply(Doc, [], {_, W, Acc}) ->
       {error, W, [{Doc, {error, internal_server_error}} | Acc]};
  
positive.code:     % icky, if replicated_changes only errors show up in result
      append_update_replies(Rest, [], dict:append(Doc, noreply, Dict0));
  append_update_replies([Doc|Rest1], [Reply|Rest2], Dict0) ->
      % TODO what if the same document shows up twice in one update_docs call?
      append_update_replies(Rest1, Rest2, dict:append(Doc, Reply, Dict0)).
  
  skip_message({0, _, W, _, DocReplyDict}) ->
  
negative.code:             {ok, {WaitingCount - 1, DocCount, W, NewGrpDocs, DocReplyDict}};
          {stop, W, FinalReplies} ->
              {stop, {ok, FinalReplies}}
          end;
      _ ->
          {ok, {WaitingCount - 1, DocCount, W, NewGrpDocs, DocReplyDict}}
      end;
  handle_message({missing_stub, Stub}, _, _) ->
      throw({missing_stub, Stub});
  