Make sure destroyed callbacks happen for templates.