Jenkins 21773

Hi folks!

I think I fixed JENKINS-21773 with this pull request, per Daniel's request.  I tested it on regular jobs, matrix jobs with one axis, and matrix jobs with two axes.  Let me know if there's anything else I need to do for this.

Thanks!