I'm not actually sure when this was fixed, but the bug report title
claims this was reported in 29.1, so I'll assume it was merged by 29.3.
Needs verifying.
The explanation could use some work, but this'll do for now. I'll
welcome PRs to expand it if I don't get to it first.
Ref: https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-08/msg00560.html