It seems BRepOffsetAPI_MakePipe modifies the given profile however in the argument list Profile is defined as a const arg.
Version: OCC 6.5.1
I have attached three pictures from the problem:
1. before sweeping
2. after sweeping with the resulting object
3. after sweeping, the profile only.
If I copy the profile, then it is not modified.