[FIXED JENKINS-20492] simply reverting to previous logic

Fixing JENKINS-20492 introduced by pull request #28 [JENKINS-8962]. This simply restores the previous behavior.