Stick to a single O[U]String hash function

Ported from: 042725a5dadc9f2c6368ca451b6d20046129b8af

Change-Id: I87f11d9101e21bdadaaffb719a762d0030639cb1