Maybe move this logic into `riak_index:index_key_in_range/3`? There is already, in that code, the facility to skip an item without aborting the fold, and saves adding skipping to the fold buffer.