Retry the application of a template if it fails.