Nice catch.

I fixed this here: https://github.com/basho/riak_kv/pull/654#commits-pushed-74efbd7

I decided to simply fix the select and leave everything else the same.  I'm not too worried about run time given what this code is for.  But if you have a strong objection let me know and we can create a separate issue to make things faster.  I just want to get this in so Yokozuna can work.