Fix: When destroying a node correctly remove the metadata for each link