moved the fix for JENKINS-10045 into the core so other scm plugins could use it