Fixed bug in task validation for non-existing parents