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