Sure, because they would try to prosecute a foreigner for his sexuality during a science conference.
Keep in mind that official enforcement isn't the only concern. Illegality can make people feel justified in taking matters into their own hands, and there have been anti-homosexual mobs and attacks in countries that recently criminalized homosexuality.