ECMS-5450 fix a problem in ApplicationTemplateManagerService which raise a bug on cloud during migration