This is now fixed
https://github.com/discourse/discourse/commit/0e6482fcf4d2a10a27ee55af4701ed2c625cbfc4