diff --git src/simutrans/freight_list_sorter.cc src/simutrans/freight_list_sorter.cc
index f956285df..be0b35091 100644
--- src/simutrans/freight_list_sorter.cc
+++ src/simutrans/freight_list_sorter.cc
@@ -32,10 +32,11 @@ freight_list_sorter_t::sort_mode_t freight_list_sorter_t::sortby=by_name;
 /**
  * This variable defines by which column the table is sorted
  * Values: 0 = destination
- *                 1 = via
- *                 2 = via_amount
- *                 3 = amount
- *                 4 = via owner of next stop
+ *         1 = via
+ *         2 = via_amount
+ *         3 = amount
+ *         4 = via owner of next stop
+ *         5 = via next line (or lineless convoy) taken
  */
 static const char* sort_text[freight_list_sorter_t::SORT_MODES] = {
 		"Zielort",
@@ -75,6 +76,8 @@ bool freight_list_sorter_t::compare_ware(ware_t const& w1, ware_t const& w2)
 			/* FALLTHROUGH */
 
 		case by_via_sum:
+		case by_via_owner:
+		case by_connection:
 		case by_amount: { // sort by ware amount
 			int const order = w2.amount - w1.amount;
 			if(  order != 0  ) {
@@ -197,7 +200,7 @@ void freight_list_sorter_t::sort_freight(vector_tpl<ware_t> const& warray, cbuff
 		}
 
 		if (sort_mode == by_connection) {
-			// conenction mode merges packets with a common next connection
+			// connection mode merges packets with all their next connections common
 			for (int i = 0; i < pos; i++) {
 				ware_t& wi = wlist[i];
 				if (wi.get_index() == ware.get_index()) {
@@ -205,18 +208,29 @@ void freight_list_sorter_t::sort_freight(vector_tpl<ware_t> const& warray, cbuff
 					halthandle_t wi_next = wi.get_next_halt();
 					bool merge = w_next == wi_next;
+					bool has_line = false;
 					if (!merge) {
-						// not same via halt, but maybe same line
-						for (linehandle_t const& line : wi_next->registered_lines) {
-							if (w_next->registered_lines.is_contained(line)) {
-								merge = true;
-								break;
+						// not same via halt, but maybe same lines
+						for (linehandle_t const& line : h->registered_lines) {
+							if (line->get_goods_catg_index().is_contained(ware.get_index())) {
+								bool is_first = w_next->registered_lines.is_contained(line);
+								bool is_second = wi_next->registered_lines.is_contained(line);
+								has_line = is_first || is_second;
+								// Don't merge if no common lines; here we know there
+								// is one, but maybe we cannot merge.
+								merge = has_line;
+								if (is_first ^ is_second) {
+									merge = false;  // At least one line not shared
+									break;
+								}
 							}
 						}
 					}
-					if (!merge) {
+					// Don't attempt to merge with convoys if at least one of the
+					// wares can take a line, since then the lines differ.
+					if (!merge && !has_line) {
 						// not same via halt, not same line, but maybe same convoy
 						for (convoihandle_t const& c : wi_next->registered_convoys) {
-							if (w_next->registered_convoys.is_contained(c)) {
+							if (c->get_goods_catg_index().is_contained(ware.get_index())  &&  w_next->registered_convoys.is_contained(c)  &&  (h.is_bound() && h->registered_convoys.is_contained(c))) {
 								merge = true;
 								break;
 							}
@@ -344,7 +358,7 @@ void freight_list_sorter_t::sort_freight(vector_tpl<ware_t> const& warray, cbuff
 				uint32 linecount = 0;
 				// maybe same line
 				for (linehandle_t const& line : h->registered_lines) {
-					if (h_next->registered_lines.is_contained(line)) {
+					if (h_next->registered_lines.is_contained(line) && line->get_goods_catg_index().is_contained(ware.get_index())) {
 						if (linecount++) {
 							buf.append(", ");
 						}
@@ -355,7 +369,7 @@ void freight_list_sorter_t::sort_freight(vector_tpl<ware_t> const& warray, cbuff
 					uint32 convoicount = 0;
 					// not same line, but maybe same convoy
 					for (convoihandle_t const& c : h->registered_convoys) {
-						if (h_next->registered_convoys.is_contained(c)) {
+						if (h_next->registered_convoys.is_contained(c) && c->get_goods_catg_index().is_contained(ware.get_index())) {
 							if (convoicount++==0) {
 								buf.append(c->get_name());
 							}
