How does the mother's body know the sex of the child? Is it detected somehow during the pregnancy and if so where is this information kept?
http://www.latimes.com/health/boostershots/la-heb-women-brai...
Note that I have no basis for this claim, but one of the many ways the body communicates is through hormones, so it certainly wouldn't be outside the realms of possibility...