Add diagnosis detecting dangling edges