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