If you want to move a land unit to a spot ON or (in a boat) UNDER a bridge, it seems the code is calculating the fastest to either of them and doesn't allow you to choose whether you want to end ON or UNDER that bridge. Imagine you ending in a boat UNDER the bridge when actually you want to attack the city that is one tile away but (by default) on land.
Graphics-wise a pop-up similar to when you click on a tile that has both building/unit(s)/item(s) allowing you to choose one of them would work here too. Path-coding-wise hopefully not too complicated...