Docs for cycle detection.