My change was rejected, for good reasons. The initial direction suggested by J Glick was a dead end. See the final comment here for the only possible change that would make sense on Jenkins side:
The new suggested solution would be to use reflection in the withSQEnv build step to extract from Bitbucket or GitHub plugins the sha1 we need. But that look very fragile and hacky, so the priority is quite low on our side for now.