Why, exactly, does he have to say "AAargh! I'm a girl!" and then be glad that he's not? The Doctor should be just as happy to be a girl as a boy.
Also, why did it take Julie to point this out to me? I should be able to spot that kind of thing myself by now...