Backport fix XSTR-739 to 1.4.4

Fixes https://issues.jenkins-ci.org/browse/JENKINS-21047