Dynamo needs to be run more than once for the right output?

Hello,
I have a successful script that gets me some Civil3D info pushed out of Dynamo, but in a few cases I have to select a pipe and run the script twice to get the right flowline for my non-pressure pipe. The first time out it moves the pipe, but it takes the second time for it to be right. Has anyone else experienced this issue?
Thank you!

I believe I found the answer… I had suspected this might be the case but second-guessed my way away from it yesterday. Nonetheless, the issue is the same as attached here – pipe diameters need to be adjusted first, then adjust the flowlines and such. Do not try to do them at the same time.
Thanks!