This should be fixed by:
https://github.com/discourse/discourse/pull/9720
Will try to get it merged next week.