Reproduce JENKINS-7285

Confirms the fix proposed in https://github.com/jenkinsci/jenkins/pull/584.

To be merged after the Jenkins pull is merged.