It's also not for the kid's parents or teachers to label him/her. That's why there shouldn't be any invasive procedures until the kid is mentally capable of making that choice. Not to mention that making an informed choice here is literally impossible if the kid didn't even get a chance to experience their biological identity - you don't really know what it means to be a boy or girl until you go through puberty yourself.