Fix hash ordering on 1.8.7 for #330