That's because the distinction doesn't actually exist.
Surely it does. One is a classification system based on biology, the other is a cultural template determined by the local culture.
You can argue that they match most of the time, or even that they should match all the time, but in contemporary usage the words "sex" and "gender" clearly have distinct meaning.
There are two things here, if we care to stick to the discussion of edge cases (which is theoretically the point of this thread...)
The first is sex, in which case we should be talking about things like Turner's syndrome and XYY syndrome; sex is not binary. It is only usually binary.
The second would be coming up with a definition of gender, and seeing if it matches our definition of sex. It is safe to say that 1) the use of 'gender' to mean the same as 'sex' is within the usual range of common usage, and 2) completely wrong under certain 'domains' (sociolo...
There are some long lists of false beliefs that programmers hold. isn't because programmers are especially likely to be more wrong than anyone else, it's just that programming offers a better opportunity than most people get to find out how incomplete their model of the world is.
I'm posting about this here, not just because this information has a decent chance of being both entertaining and useful, but because LWers try to figure things out from relatively simple principles-- who knows what simplifying assumptions might be tripping us up?
The classic (and I think the first) was about names. There have been a few more lists created since then.
Time. And time zones. Crowd-sourced time errors.
Addresses. Possibly more about addresses. I haven't compared the lists.
Gender. This is so short I assume it's seriously incomplete.
Networks. Weirdly, there is no list of falsehoods programmers believe about html (or at least a fast search didn't turn anything up). Don't trust the words in the url.
Distributed computing Build systems.
Poem about character conversion.
I got started on the subject because of this about testing your code, which was posted by Andrew Ducker.