Patch from Svante Signell. Fixes PR go/98496 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/283692