My question would be, why are you not drawing the polyline you want first, and NOT needing to offset it at all?
If that result is what you are after....
As well as; why are you exploding the original polyline?
Sounds like a work flow issue, not a programming one.