Rebasing the Go 1.22 patches on top of Go 1.23.0, as published on https://github.com/burrowers/go-patches/pull/7. Updates #859.