There is a contradiction in the rules.
- From 14.3, the demoralized units would not have to flee because the demoralized units could not obtain a result on them using Direct Fire as demoralized units cannot use direct fire. The example makes it clear.
- From 14.35, the demoralized units must flee the assault hex.
The way I play it is the units must flee but the demoralized units left in the hex do not get a free shot. Just like you, it appears.
14.3 Demoralization
A demoralized unit or leader:
...
If it fails to recover, it must flee (14.31) from enemy combat units that can spot it, are within range to attack it, and are capable of obtaining a combat result against it through Direct or Anti-Tank Fire, including Assault (14.35; exception 14.33). For example, a demoralized AFV is not required to flee from an enemy INF unit unless they are in an assault hex together. Mark the unit as Moved/Fired once it finishes fleeing for the turn.
14.35
Demoralized units in an assault hex that fail a morale check must exit the hex, and may move only one hex when doing so (12.13). On later activations they flee at their full movement rate if they fail to recover.