Solved by updating GlossaryDocumentSaveEventListener so that the transformation occurs on page creation beside occuring on page update.