24489 Fix problems in parent task loop detection.