Configuring loop detection