Certainly, trying to define someone's gender by looking between their legs is probably the least reliable way. I was freakishly small as a baby and had no testes, but I still got the label because I had a teeny weeny peeny.

It might be best for doctors not to try to make the decision at birth, but rather tell the parents that either the male or female personality will emerge and dominate, and then the appropriate corrections can be made. I just wish that doctors could explain it that way to the general public.