I have this hypothesis, nay theory. It's too solid to be a mere hypothesis.
There must logically exist both male and female souls. Gender must logically exist in the soul and not just the body:
1) The soul is the source of life of the body, but the body is both male and female. Therefore, the soul must be male and female also.
2) Ordination pertains to the soul, not the body, yet only males may be ordained. Therefore, the soul must be male and female like the body.
3) Like ordination, a person's relationship with God, which might very well include ordination,
pertains to the soul, not the body, yet men are called to serve God in a
masculine manner as proper gentlemen and women in a feminine manner as
proper ladies, each according to the unique dignity for which he was created. Therefore, the differentiation of sex must exist in both the soul and the body.
4) There is no reason to believe that someone looses their gender when they
die, since we are still the same people after death that we were in
life, yet we all loose our bodies when we die. Therefore, gender must
exist in the soul also, not just the body.
I'm sure someone could compose an excellent Thomistic article about this. Of course my four proofs that gender exists in the soul and not just the body would be the responses to the objections.