Prevent nodes with no links

(unless there is only one node)