I have seen the pictures, it still doesn't change the XY result on the chromosome test. Admittedly a Muslim country overlooking this is odd, but hypocrisy is nothing new in the realm of politics. It is possible Khalif may have been mistaken for a girl at birth due to intersex people having both sets of genitalia, they are still genetically and hormonally one or the other though.
That doesn't explain why Kelif failed a chromosome test for a prior event. It also doesn't explain the boner he had during, and a bit after the "fight."