Don't crash on template destroyed callback