When using an existing legacy service which does not properly cleanup the pipeline before returning.
Prior to invoking the service, create a temporary document in the pipeline and map the required inputs into that document. Invoke the service with the "scope" property set to the temporary document's name. After invoke, map any outputs and drop the temporary document.
First we map the varialble serverhost, into a document - 'Untitled'
Then we set the scope parameter of the inner service to the document - 'Untitled'
You can test this by using trace and then stepping into the service, there you can see the content of the pipeline is now scoped