Ok, this is now fixed
https://github.com/discourse/discourse/commit/fd62909819fd6564931ead2ce0ff6cde8185ed5c