Sort line_items by parent then children