Working version in the SelfHost sample.