@mdempsky requested issue #58513 to be considered for backport to the next 1.20 minor release.
Extending the same kludge from 6a801d3 to synthetic closures fixes the issue. That's probably the easiest solution for backporting to 1.20.
@gopherbot Please backport to Go 1.20.