As of this commit from @david, this should work cleanly now
https://github.com/discourse/discourse/pull/10289