There is a subtle bug in DELETE_WORLDMAP_LINKS which means it doesn't work correctly if there are multiple links between the same areas at the same direction node.
(Which, yes, should never happen, but it does, even in the vanilla game: look at the North set of links from AR6400.)
The offending bit of code is (worldmap_links.tpa line 71 et seq.):
PATCH_FOR_EACH node IN 0 3 2 1 BEGIN
io = lao + 0x50 + 0x8 * node
no = lao + 0x54 + 0x8 * node
WRITE_LONG io links
READ_LONG no number
PATCH_IF "%source_name%" STRING_EQUAL_CASE "%from_area%" AND
(source_node = node OR source_node = fl#SOURCE_NODE_DEFAULT)
BEGIN
FOR (j = 0; j < number; ++j) BEGIN
llo = lo + 0xd8 * (links + j)
READ_ASCII ao + 0xf0 * (LONG_AT llo) target_name
PATCH_IF "%target_name%" STRING_EQUAL_CASE "%to_area%" BEGIN
DELETE_BYTES llo 0xd8
--number
END
END
END
WRITE_LONG no number
links += number
END
This fixes it:
PATCH_FOR_EACH node IN 0 3 2 1 BEGIN
io = lao + 0x50 + 0x8 * node
no = lao + 0x54 + 0x8 * node
ndel=0
WRITE_LONG io links
READ_LONG no number
PATCH_IF "%source_name%" STRING_EQUAL_CASE "%from_area%" AND
(source_node = node OR source_node = fl#SOURCE_NODE_DEFAULT)
BEGIN
FOR (j = 0; j < number; ++j) BEGIN
ncurrent = j - ndel
llo = lo + 0xd8 * (links + ncurrent)
READ_ASCII ao + 0xf0 * (LONG_AT llo) target_name
PATCH_IF "%target_name%" STRING_EQUAL_CASE "%to_area%" BEGIN
DELETE_BYTES llo 0xd8
ndel +=1
END
END
END
WRITE_LONG no ( number - ndel)
links += (number - ndel)
END