fixes #6843 - use the new template locking mechanism in foreman

I don't think this will update existing templates.