I apologize it has taken so long for me to post this, but as promised, here is the .cs file for the wsdl flattener.
FlatWSDL.cs (10.75 kb)
To use it, you need to modify your web config and add a reference to the library in the behavior extensions section:
(YOUR ACTUAL ENTRIES MAY VARY)
<add name="FlatWSDL" type="SteverB.Services.Extensions.FlattenWsdlBehavior, SteverB.Services.Extensions, Version=18.104.22.168, Culture=neutral, PublicKeyToken=[something]" />
And then to turn it on, modify the service behavior by adding the <FlatWSDL /> tag:
I hope that helps someone!