Fix for JENKINS-16650

Please see https://issues.jenkins-ci.org/browse/JENKINS-16650. 

It's a simple change. See https://github.com/nullin/jenkins/commit/defc72be6a9cc1d9323ecc0248423f318a72e121 and ignore other commits in this pull request.