Improve hash efficiency on PatchDefinitions