This is now fixed in the commit
https://github.com/discourse/discourse/commit/2f9879a9a134f3b9bf17489dce977e1655df5d37