You can do whatever the fuck you want, as long as you have an expensive enough lawyer who will "correct" you, when people point out what you're doing is illegal.
It's by design though. None of this is because of loopholes. What is happening is because the people in power wanted it to be possible.
And how do you determine who raped who if it's a question about how drunk you were? I have had a lot of nights out in my teens (european), where I have no clue what happened after midnight, but didn't get home until 05:00. If I had sex with someone pretty much equally as drunk, who did the raping?