– the arrow head swaps ends in the flipped scrap –

The should be an automatic decision if arrow is (mostly) horizontal - where the flip of arrow is correct - or (mostly) vertical - where it is not.

m.s.