After the patch these formations bug out in at least 50% of the engagements. At least before we knew that they will go idiot mode if formation attack is enabled, but now they just bug no matter what.
So how do they bug:
1. Turning their backs to the enemy
2. Pulling through the enemy's formation and again exposing their backs to the enemy
3. Getting completely surrounded by the enemy's unit.
4. Forming closer formation and thus getting surrounded
5. Units can now run in shield wall/hoplite phalanx formation.