This is an excerpt from a grammar book by Longman. It was discussing tense and time distinctions and the excerpt is about future time.
As you can see in the next example, the reference can be to a situation that never actually occurred:
'I was going to be called Kate if I was a girl.'
What I get from the example is the impression that the narrator is a man and before he was born his parents decided upon the baby's name if it were a girl. What I want to know is shall I use the subjunctive form were instead of was in "...if I was a girl."? Or is the sentence correct?