Detect recursion in objects