anchor.diff:                                                    "vbucket map chain: ~p", [NodeIx]),
                                 ?log_error("~s", [Msg]),
                                 {error, bad_value, iolist_to_binary(Msg)};
  +                          {ok, none} ->
  +                              Msg = io_lib:format("Invalid node reference in "
  +                                                  "vbucket map chain: ~p. "
  +                                                  "Found node without couchApiBase in active vbucket map position", [NodeIx]),
  +                              ?log_error("~s", [Msg]),
  +                              {error, bad_value, iolist_to_binary(Msg)};
                             {ok, URL} ->
                                 VBucketURL0 = [URL, "%2f", integer_to_list(VBucket),
                                                "%3b", BucketUUID],
                                 VBucketURL = iolist_to_binary(VBucketURL0),
  -                              do_build_vbmap_chain(Rest, BucketUUID, IxToCouchDict,
  -                                                   VBucket, [VBucketURL | R])
  +                              {ok, [VBucketURL]}
                         end
                 end
         end).
  
positive.code:     with_server_list(
        ServerMap,
        fun (ServerList) ->
                case build_ix_to_couch_uri_dict(ServerList,
                                                McdToCouchDict) of
                    {ok, IxToCouchDict} ->
                        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);
                    Error ->
                        Error
                end
        end).
  
  build_vbmap(RawVBucketMap, BucketUUID, IxToCouchDict) ->
  
negative.code:     do_build_ix_to_couch_uri_dict(ServerList, McdToCouchDict, 0, dict:new()).
  
  do_build_ix_to_couch_uri_dict([], _McdToCouchDict, _Ix, D) ->
      D;
  do_build_ix_to_couch_uri_dict([S | Rest], McdToCouchDict, Ix, D) ->
      case dict:find(S, McdToCouchDict) of
          error ->
              ?log_debug("Was not able to find node corresponding to server ~s. Assuming it's couchApiBase-less node", [S]),
  
              D1 = disc:store(Ix, none, D),
              do_build_ix_to_couch_uri_dict(Rest, McdToCouchDict, Ix + 1, D1);
          {ok, Value} ->
              D1 = dict:store(Ix, Value, D),
              do_build_ix_to_couch_uri_dict(Rest, McdToCouchDict, Ix + 1, D1)
  