Check for directedness, add a de-loop transform.