Fix JENKINS-22933

Fixed logic that loads the templates for saved jobs.