Ok this is now fixed per:
https://github.com/discourse/discourse/commit/0303080586649c6715317fa1da1c2ef8a3de0fdf
and
https://github.com/discourse/discourse/commit/22b8c0d44ee2f75042a6848460f49ab3758dbd22
Will get it deployed to all our sites in the next few days.