This was a copy paste job from merge.rb with some additional test for recursive hashes.