Fix error when hashing index data in tree builds

/cc @jtuple 

The riak test for this: https://github.com/basho/riak_test/pull/483