Even if were to accept that people would be permitted that sort of leeway out of ignorance, the defense still should not apply. If you deliberately lure (in a sexual context) someone you know to be gay, you forfeit any sort of justification for "freaking out" just because he did exactly what you tried to get him to do (make an advancement towards you). You can't invoke "panic" when you knowingly force the situation.
I don't know whether it's the prosecution or the jury that dropped the ball here, but this sort of logic isn't hard to walk through.