brought the fix for JENKINS-10045 into the core so other scm plugins can use it