Fix dangling pointers in insert_link
Throw hands up in despair

Using arrays of pointers to keep stuff sorted is not an option if said stuff is being reallocated. Not even pointer arithmetic can help!