There was one black female mentee who I noticed was timid in taking credit for her work. I had recently attended a diversity panel where someone in a similar role as me said that in a similar situation, and her advice to her mentee was "Think about what a white man would do" and everyone applaud such an insightful advice. So identifying such an opportunity, I said the exact same thing word for word, basically "I see you're hesitating to take credit for your work. Think about what a white man would do."
Immediately after saying that, I could tell it wasn't taken well, and she asked "what does that mean?" I couldn't come up with an answer for that which wouldn't be taken in a really bad way, so I backpedaled. She later reported me to an administrative person who luckily felt it was too vague to file a serious report about, but told me to watch what I say.
But I do have a solution (my trick). From that point on, I definitely give more subtle advice unless they have passed my test, which is I see how they react to situations where they could give the benefit of the doubt to others in vague situations. Sometimes, I'll bring up a past story about another anonymous person and see if they are outraged and want to get them in trouble. Only the ones who remark that they probably had good intentions, and don't react too strongly, I'll give more candid advice to.
In this case a simple followup of "you deserve more credit and I want you to feel able to advocate for yourself" would have cleared up the confusion and avoided a lot of trouble, and you wouldn't have had to invent a story-telling system in order to filter out people who believe in accountability.