I have checked the code now, and yes it does not calculate the best path under these circumstances. The problem is that your ships already were located on the Anchor, the pathfinding algortihm then incorrectly thinks it can convert to Landunit for no cost, so thats why it suggest you move this way if you click on the bridge.
(I guess you had some bad luck also to select 1 tile below the bridge so you got an almost correct path, and then when doubleclicking it calculates diffrently because of the bridge)
Since it is a very rare thing to happen, I wont update the code now since it is a risk that would have performance impact for the pathfinding (adding more logic there will have a cost unfortunately since it is iterating through that function thousands of times for each path you click out
)
I have added it to the to-do list though and will see if I can update it in the future when I can test performance without affecting the current games.
Thanks for reporting, and sorry about your lost turns