Fix for JENKINS-19344

Fixes https://issues.jenkins-ci.org/browse/JENKINS-19344