Is this a safe way to combine hashes?