diff --git a/SAS/TMSS/client/lib/populate.py b/SAS/TMSS/client/lib/populate.py
index d6012f41343d0b2c589aed0e72b64e6e630619c0..a1eab1b2c73ad4b53c470c2ebc1d208ccb44664f 100644
--- a/SAS/TMSS/client/lib/populate.py
+++ b/SAS/TMSS/client/lib/populate.py
@@ -66,9 +66,6 @@ def populate_schemas(schema_dir: str=None, templates_filename: str=None):
                     # override plain-text type by its url
                     template['type'] = client.get_full_url_for_path('task_type/' + template.get('type'))
 
-                # inject a unique id in the form of a unique URL to this schema
-                json_schema['$id'] = client.get_full_url_for_path('schemas/%s/%s/%s' % (template_name.replace('_', ''), template['name'], template['version']))
-
                 # make sure that all urls point to the tmss base_url
                 json_schema = json_utils.replace_host_in_urls(json_schema, new_base_url=client.host_url)
 
@@ -78,6 +75,8 @@ def populate_schemas(schema_dir: str=None, templates_filename: str=None):
                 if 'strategy_template' in template_name:
                     template['template'] = json_schema
                 else:
+                    # inject a unique id in the form of a unique URL to this schema
+                    json_schema['$id'] = client.get_full_url_for_path('schemas/%s/%s/%s' % (template_name.replace('_', ''), template['name'], template['version']))
                     template['schema'] = json_schema
 
                 # what are the references? on which other schema's does this schema depend?