Improvements to compute_database_hash_hash.