The swapping code incorrectly expected the link to have a start and end. However, this was not necessarily the case when attempting to create a link from a node to itself. This case has special handling in `node_link_find_socket`.
The swapping code incorrectly expected the link to have a start and end. However, this was not necessarily the case when attempting to create a link from a node to itself. This case has special handling in `node_link_find_socket`.