24107 parent task loops

This is kind of messy, but it's better than having everything break when a user creates a parent task loop.

I don't know why the task.php change got pulled in but to memory it's useful.