[JENKINS-11964] Reintegrating changes from discarded pull request