Index: core/units/helpers/cat_dbitem_export_helper.php
===================================================================
--- core/units/helpers/cat_dbitem_export_helper.php
+++ core/units/helpers/cat_dbitem_export_helper.php
@@ -531,7 +531,7 @@
 					$sql = substr($sql, 0, -4);
 				}
 
-				$sql .= ' ORDER BY ci.PrimaryCat DESC'; // NEW
+				$sql .= ' ORDER BY ci.PrimaryCat DESC, c.TreeLeft ASC, item_table.' . $this->curItem->IDField . ' ASC';
 			}
 			else {
 				// get only selected links