Linked list loop detection.