It properly detects when the red node is inside the blue node and exits when that is the case.