anchor.diff:        end).
   
   build_vbmap_chain(Chain, BucketUUID, IxToCouchDict, VBucket) ->
  -    do_build_vbmap_chain(Chain, BucketUUID, IxToCouchDict, VBucket, []).
  -
  -do_build_vbmap_chain([], _, _, _, R) ->
  -    {ok, lists:reverse(R)};
  -do_build_vbmap_chain([NodeIxRaw | Rest], BucketUUID, IxToCouchDict, VBucket, R) ->
  +    [NodeIxRaw | _Rest] = Chain,
       expect_number(
         NodeIxRaw, <<"Vbucket map chain">>,
         fun (NodeIx) ->
                 case NodeIx of
                     -1 ->
  -                      do_build_vbmap_chain(Rest, BucketUUID, IxToCouchDict,
  -                                           VBucket, [undefined | R]);
  +                      {ok, [undefined]};
                     _ ->
                         case dict:find(NodeIx, IxToCouchDict) of
                             error ->
  
positive.code:     do_build_ix_to_couch_uri_dict(ServerList, McdToCouchDict, 0, dict:new()).
  
  do_build_ix_to_couch_uri_dict([], _McdToCouchDict, _Ix, D) ->
      {ok, D};
  do_build_ix_to_couch_uri_dict([S | Rest], McdToCouchDict, Ix, D) ->
      case dict:find(S, McdToCouchDict) of
          error ->
              ?log_error("Was not able to find node corresponding to server ~s",
                         [S]),
  
              Msg = io_lib:format("(bucket server list) got bad server value: ~s",
                                  [S]),
              {error, bad_value, iolist_to_binary(Msg)};
          {ok, Value} ->
              D1 = dict:store(Ix, Value, D),
              do_build_ix_to_couch_uri_dict(Rest, McdToCouchDict, Ix + 1, D1)
  
negative.code:     with_server_list(
        ServerMap,
        fun (ServerList) ->
                IxToCouchDict = build_ix_to_couch_uri_dict(ServerList,
                                                           McdToCouchDict),
                expect_nested_array(
                  <<"vBucketMap">>, ServerMap, <<"vbucket server map">>,
                  fun (VBucketMap) ->
                          VBucketMapDict =
                              build_vbmap(VBucketMap,
                                          BucketUUID, IxToCouchDict),
  
                          #remote_cluster{uuid=ClusterUUID} = RemoteCluster,
                          RemoteBucket =
                              #remote_bucket{uuid=BucketUUID,
                                             cluster_uuid=ClusterUUID,
                                             vbucket_map=VBucketMapDict},
  
                          {ok, {RemoteCluster, RemoteBucket}}
                  end)
        end).
  
  build_vbmap(RawVBucketMap, BucketUUID, IxToCouchDict) ->
  