Reorient Structural Framing

I am trying to reorient all structural framing to have a positive x/y vector.
For all level (non slanted) framing the attached script identified the framing, but does not update the location. The weird thing is, if you slant the framing, the script works correctly.
Anyone know what I am doing wrong?

Can you share a screenshot with all the node preview bubbles pinned? Does everything look correct at first glance?

Yes, I can post a screenshot tomorrow when I get back to the office.
But, yes, the lines are being reversed. Start/End/Vector all appear to be going into the set location node properly.
I also plan on trying to apply a slight offset then removing it to see if there was an issue with the element movement only reversing direction but being in the same place.
Will update Monday.
Thanks.