Adding reverse and loop detection problems