This is old, but just in case someone comes across it when they need it......
A Connect By loop is always caused by a parent/child relationship. The problem is, the child is installed on its parent, and it's parent is installed on the child. Hence the loop.
I only know this now because I spent all day trying to FIND the bloody looping record. A half-dozen scripts later - I found one that worked! It turned out it was so difficult to find because it was an item installed on ITSELF. HOW our app users managed that...