I have a PR up to fix this:
https://github.com/discourse/discourse/pull/11544
Thank you for reporting @amotl