Fix to SI-8289

DocTemplateEntities that have identical name are now sorted
according to their qualified name.