How to stop damage from looping when not inside damage area

Yes, because after the hit, you send it into a loop it never comes out of.

It would work better to keep testing if they are still overlapping and deal damage: