Minor refactoring of nom/hash (no semantics change).