Prevent links looping back from crossing other links


I have a diagram which uses the TreeLayout and some nodes loop back to the top. This has the unfortunate effect of crossing existing links (since I am avoiding nodes) and I was wondering if it would be possible to make loops always avoid crossing existing links.

Here is a snapshot of what I am getting:


If you are using AvoidsNodes Link.routing, the routing is only supposed to try to avoid crossing over any other nodes, not any other links. And in fact it is easy to imagine a graph where it would be impossible for every link not to cross over some links – any non-planar graph has that characteristic.