Replace DefinitionRef in StateData with a definition id
defRef is only used to know if the definition used has not changed. Comparing an incremented id to each DefinitionData is sufficient.
defRef is only used to know if the definition used has not changed. Comparing an incremented id to each DefinitionData is sufficient.