ECMS-5450 Fix a problem in ApplicationTemplateManagerService for cloud migration