How to use GroupByParam with param subkeys?

I want to use the Pages.GroupByParam to group by a param subkey.

Example frontmatter taken from the page.Params docs

{
   "date": "2023-10-17T15:11:37-07:00",
   "params": {
      "author": {
         "email": "jsmith@example.org",
         "name": "John Smith"
      },
      "display_related": true
   },
   "title": "Annual conference"
}

The param I am interested in is author.name and the following code works

{{ .Params.author.name }}

When I try to group pages by the author.name param the page errors out stating the param does not exist.

{{ range .Pages.GroupByParam "author.name" }}

Is there another way to do this?

{{ $p := slice }}
{{ $authors := slice }}
{{ range site.RegularPages }}
  {{ $p = $p | append (dict "author" .Params.author.name "page" .) }}
  {{ $authors = $authors | append .Params.author.name }}
{{ end }}
{{ $authors = $authors | uniq | sort }}

{{ range $authors }}
  <h2>{{ . }}</h2>
  {{ range where $p "author" . }}
    <h3><a href="{{ .page.RelPermalink }}">{{ .page.LinkTitle }}</a></h3>
  {{ end }}
{{ end }}

Please create a GitHub issue. Sorting works:

{{ range site.RegularPages.ByParam "author.name" }}

Grouping should work too:

{{ range site.RegularPages.GroupByParam "author.name" }}

See https://github.com/gohugoio/hugo/issues/12289