fix another self-edge handling issue