Yes, the edit I made should correct it from what I can see. For how the fixed virginity check works. First, it will decide if the player character is an anal virgin. If they are, check if they have a penis and see if they kept their penis virginity. Then if that's true, check if they have a vagina and if they kept their vaginal virginity. This should cover most of the bases...
I did want to ignore the genitals and just check the virginity variables (which would be the most encompassing), but I think it was set with genitals in mind just in case those virginity variables were never set properly for old saves or something? Not quite sure. But with how it is set up now, it's possible to, say: retain anal virginity, have a vagina and lose vaginal virginity, lose the vagina and gain a penis and lose penis virginity, then lose the penis and become sexless--the character will be counted as a virgin because the anal virginity was never taken and they don't have either genital. I might have to discuss with the team about which method is preferred though.