Bugfix: Check whether edge is deleted before touching its nodes.