Looks like this is now fixed, thanks to @justinm
https://github.com/discourse/discourse/commit/9125f85e697dfb7797d6d79a2f66e0032ed168dd