the new Salt version automatically removes edges from their layers if the edges are removed from the graph. so we have to re-add the layers to edges when nodes are recreated