Man convicted of killing a child set to get a new trial