Same as https://github.com/pulumi/pulumi/pull/15165, a small bit of code we can move just to the language host.