Fix memory leak when a template is removed from the DOM