Correct the child index after removing a child