@FiloSottile requested issue #21376 to be considered for backport to the next 1.9 minor release.
@gopherbot please file this for backport.
See @aclements's comment #21376 (comment) about having to develop a different fix from CL 106275 in order not to break a public API.