Fix bad hash construction part of #1961.