[JENKINS-18429] Correcting faulty logic in 8b4f3042700b14dbf4d9fc177e42fadc5ddebb30.