There are a lot of "maybes" here. Maybe he's had a bad experience, maybe he hasn't had any experience and he feels torn between accepting his sexual nature and fear of being a "pervert." It sounds like he was sending out some kind of a signal, consciously or unconsciously, and that from your perspective it didn't seem like an odd thing to ask.

And, frankly, it doesn't strike as if it would be. If you're wrong, you're just wrong -- curiosity among friends. I don't see why this would be a big emotional drama for him. It sounds to me like he has something to work out for himself. If asking him a simple personal question throws him into some sort of a panic, I think we can safely call that an overreaction on his part.

Give him some space, leave the question alone, and see if things heal over. He's a guy and guys have a great ability to pretend something never happened. See if his guy instincts kick in and the whole blows over.