If you’re a woman or a minority member, you can probably recall at least one instance where a female or minority higher-up, whom you might have thought of as a potential mentor, treated you with disdain. Maybe you were shocked, even hurt, that someone of your own gender or ethnicity could be so cold.

Well, get over it. Research by Stefanie Johnson and David Hekman of University of Colorado’s business school finds that’s there’s a perfectly good reason why women and minorities aren’t helping their own: They get penalized when they promote diversity. (The study surveyed 350 executives about their attitudes on diversity, then analyzed how their bosses rated their performance.) The study’s authors write in Harvard Business Review: