Fix JENKINS-18443 when running on slaves