Fix error when hashing index data in tree builds