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