Check for recursion in objects