This phenomenon lasted right up through the 1990s. I had to take polygraph tests for my security clearance in the 1990s, tests that included questions about my sexual orientation. If I had admitted to or been discovered to be gay, I would have lost my clearance and my job in the Air Force.