Index: code/ai/ai_profiles.cpp
===================================================================
--- code/ai/ai_profiles.cpp	(revision 9408)
+++ code/ai/ai_profiles.cpp	(working copy)
@@ -465,6 +465,8 @@
 
 			set_flag(profile, "$no warp camera:", AIPF2_NO_WARP_CAMERA, AIP_FLAG2);
 
+			set_flag(profile, "$fix ai path order bug:", AIPF2_FIX_AI_PATH_ORDER_BUG, AIP_FLAG2);
+
 			// ----------
 
 			// compatibility
Index: code/ai/ai_profiles.h
===================================================================
--- code/ai/ai_profiles.h	(revision 9408)
+++ code/ai/ai_profiles.h	(working copy)
@@ -64,6 +64,7 @@
 #define AIPF2_NO_WARP_CAMERA										(1 << 10)
 #define AIPF2_ASPECT_LOCK_COUNTERMEASURE							(1 << 11)
 #define AIPF2_AI_GUARDS_SPECIFIC_SHIP_IN_WING						(1 << 12)
+#define AIPF2_FIX_AI_PATH_ORDER_BUG									(1 << 13)
 
 // AI Path types
 #define	AI_PATH_MODE_NORMAL 0
Index: code/ai/aicode.cpp
===================================================================
--- code/ai/aicode.cpp	(revision 9408)
+++ code/ai/aicode.cpp	(working copy)
@@ -11464,6 +11464,14 @@
 	}
 	
 	if (aip->mode == AIM_WAYPOINTS) {
+
+		if (The_mission.ai_profile->flags2 & AIPF2_FIX_AI_PATH_ORDER_BUG){
+			// skip if wing leader has no waypoint order or a different waypoint list
+			if ((laip->mode != AIM_WAYPOINTS) || !(aip->wp_list == laip->wp_list)){
+				return 1;
+			}
+		}
+
 		aip->wp_list = laip->wp_list;
 		aip->wp_index = laip->wp_index;
 		aip->wp_flags = laip->wp_flags;
