Thanks for the report, @davidb’s recent work seems to have surfaced this issue.
Will be fixed by
https://github.com/discourse/discourse/pull/38964