I have tested unseen sub and stealth destroyers with my modcomp:
http://forums.civfanatics.com/showthread.php?t=298512
and there're no side effects (the battleship of your example ends its move in the same tile as the stealth target).
What I haven't altered is the stardard behaviour of "go to" order when the enemy unit is not in the final plot of the path. The battleship would alter its path (without finishing its move) if an enemy destroyer is in a middle tile of the path.
In my mod, I provided another "go to" mode: "go to and sentry". Using this mode, the battleship stops its movement when an enemy unit is seen (one, two or more tiles away, depending on its visibility range).
I think both "go to" and "go to and sentry" mode should exist. Maybe you want a unit to go to a distant tile even if an enemy unit is nearby. What is true is that a unit in "go to" mode should stop if an enemy is blocking a choke point and path recalculation leads to a substantially longer path than the original one (I haven't altered this questionable behaviour on my mod).
Three screenshots to show "go to" mode behaviour when an enemy unit is blocking a choke point:
1. Civ4ScreenShot0000.JPG shows the calculated path from initial tile to destination.
2. Civ4ScreenShot0001.JPG shows the destroyer following the real path as it is recalculated to consider the enemy unit blocking thw choke point.
3. Civ4ScreenShot0002.JPG shows the destroyer arriving at the final point of the recalculated path. The destroyer now has no left movement points as opposed to the initial path.
My mod does not alter this behaviour. What it does is finish the movement if the enemy destroyer is on the final tile of the initial path.
My "go to and sentry" mode finish the movement when an enemy unit is spotted
on any direction.
It can be seen in another two screenshots:
4. Civ4ScreenShot0003.JPG shows the new order "go to and sentry" icon and help.
5. Civ4ScreenShot0004.JPG shows the end point of the movement with this order.
My "go to and sentry" mode can be seen really as a sort of "hunt mode". In fact, I created it to give tons of experience to my privateers hunting enemy caravels. AI seems to have a predisposition to build many caravels when privateers are sacking its coast, but it doesn't make serious mass suicidal attacks (as it should do). So I hunt their caravels one by one moving my privateers in "go to and sentry" mode along the enemy's coast.
Maybe the correct aproach to normal "go to" mode should be my "go to and sentry" mode, but only on a directional way: a unit should stop its movement if an enemy unit is on the initial path, rather than recalculate a new path. Maybe a modification of SentryAlert function, changing a call to "canSeePlot(pPlot, pHeadUnit->getTeam(), iMaxRange - 1,
NO_DIRECTION)" to "canSeePlot(pPlot, pHeadUnit->getTeam(), iMaxRange - 1,
pHeadUnit->getFacingDirection(true))" could do the trick...