Preserve template ID when updating a user-generated template
Currently when the "Publish Template" menu item is used, the old template and its models are deleted before creating the new template.
Instead, it would be better to update the existing template (so it can continue to be referenced using the same ID), even if the associated models are deleted and recreated.