This was fixed by @gdpelican in
https://github.com/discourse/discourse/commit/609969bf6fcd4b9e57e0f5183577ba10c6fbe54c