Parent and child relationship is broken when do the sort based on parent name

Duplicate of this