Add TCs for Loop Detection in the Distributed Case
Implement tests to prevent loops in the Distributed Case
issue