Looks like this might have been fixed properly in core via https://github.com/jenkinsci/jenkins/commit/0725d2765da789e02914deb4893a449eeda6a820 which landed in jenkins-1.462
Related core issue (fixed)