validated on 3.12 branch and applied in backport of #10448; this brings the fixes up to `master`
mentioned in commit cf6717df
mentioned in commit eb4dcb77