I moved the whole block of group_by into a new `OntologyVersion#state_message` method.