I experienced that situation to a degree, as a US Army officer. Our official US policy doesn't allow gays to serve in uniform, and if someone did something of a homosexual nature to my knowledge, or admitted his or her gay orientation, I was required to take actions to remove them from the military.
I was at least spared the conflict of being a hypocrite, because I honestly didn't think I was gay myself. At the same time, I and most of my fellow officers had no taste for gay witch hunting.
I never once had evidence of someone being gay flaunted right in front of me, and I certainly didn't go looking for it. I did have my suspicions a few times, but I just ignored it. I never brought any charges or took prejudicial actions against anyone for allegedly being gay during my entire 25 years.
Yet neither did I have a strong objection to the basic policy of denying known or admitted gays service in the US military. Relying on the stereotypes I accepted until the day I came out myself, I thought that gays weren't suited for uniformed duty. I'm ashamed of that belief now, but as an officer I was bound to enforce those rules, had I encountered that situation within my command.
So I guess I was a "potential" homophobe, and a defender of the anti-gay status quo. I try to make up for it now.