Add cycle check.