apply Monero fix to tree_hash