anchor.diff:              Acc2 = maybe_throttle_build(RObj, Limit, Wait, Acc),
               Acc2
       end;
  -fold_fun(Tree, _HasIndexTree = true) ->
  +fold_fun(HashtreePid, _HasIndexTree = true) ->
       %% Index AAE backend, so hash the indexes
  -    ObjectFoldFun = object_fold_fun(Tree),
  -    IndexFoldFun = index_fold_fun(Tree),
  +    ObjectFoldFun = object_fold_fun(HashtreePid),
  +    IndexFoldFun = index_fold_fun(HashtreePid),
       {Limit, Wait} = get_build_throttle(),
       fun(BKey = {Bucket, Key}, BinObj, Acc) ->
               RObj = riak_object:from_binary(Bucket, Key, BinObj),
  
positive.code: 
  -spec maybe_build(state()) -> state().
  maybe_build(State=#state{built=false}) ->
      Self = self(),
      Pid = spawn_link(fun() ->
                               build_or_rehash(Self, State)
                       end),
      State#state{built=Pid};
  maybe_build(State) ->
  
negative.code: %% before the fold reaches the now out-of-date version of the object, the old
  %% key/hash pair will be ignored.
  %% If `HasIndexTree` is true, also update the index spec tree.
  -spec fold_keys(index(), pid(), partition(), boolean()) -> ok.
  fold_keys(Partition, HashtreePid, Index, HasIndexTree) ->
      FoldFun = fold_fun(HashtreePid, HasIndexTree),
      Req = riak_core_util:make_fold_req(FoldFun,
                                         0, false,
                                         [aae_reconstruction,
                                          {iterator_refresh, true}]),
      Result = riak_core_vnode_master:sync_command({Partition, node()},
                                          Req,
                                          riak_kv_vnode_master, infinity),
      handle_fold_keys_result(Result, HashtreePid, Index).
  
  
  %% The accumulator in the fold is the number of bytes hashed
  %% modulo the "build limit" size. If we get an int back, everything is ok
  handle_fold_keys_result(Result, Index, HashtreePid) when is_integer(Result) ->
      lager:info("Finished AAE tree build: ~p", [Index]),
      gen_server:cast(HashtreePid, build_finished);
  handle_fold_keys_result(Result, Index, HashtreePid) ->
      lager:error("Failed to build hashtree for index ~p. Result was: ~p", [Index, Result]),
      gen_server:cast(HashtreePid, build_failed).
  
  get_build_throttle() ->
      app_helper:get_env(riak_kv,
  