Incidentally, this all started with creating a mechanism for people with DSDs who had been mis-sexed at birth, to correct their birth certificate. Sex was decided on the basis of physical characteristics, but not only the apparent genitals. Transsexuals - ie people who had not been mis-sexed but who wanted to live as if they were the opposite sex and probably had had, or were planning to have, GRS to some degree, pushed the idea of psychological sex as one factor in determining sex. That concept was resisted by the judiciary until quite late in the day but by the 1970s (I think) the idea that your sex was at least partly about how you "felt", was seriously entertained.
We can see how elements of a perfectly reasonable move to help people with an actual medical condition were subverted to the GII cause. One salient example being the "correction" of a birth certificate, which now actually means "falsification". How psychological sex became GI/gender and so on. The GI movement completely took over.
ETA: Partly in answer to BundleBoogie and Mumteedum