Fixed unnecessary codes added by changes for JENKINS-17680.