This avoid double-disposing which creates a leak in .NET 4.0 when running using SelfHost