This happens in any workplace...heck remember all this in school? For some reason that stuff sticks...and does carry on to adulthood, some places more than others, and some people more than others. Sadly a fact of life, and one we should all work on in ourselves to stop.
I have encountered it many times on different levels, from subtile facial expressions to full out phrases that make my skin crawl.
How I deal with it...I simply stop it all on my end, because I am responsible for my own actions not anyone elses...so best thing...stop it on my end and therefore it stops yet another stem on the grapevine
I don't tend to make stands on it because that just leads to trouble and really doesn't change much, however...I will switch the situation using effective listening and proactive and thoughful responses to quell the convo to a stopping point.
I remember one situation where some Doctors were getting all frustrated and down on a patient who had a personality disorder...like that person could help it, especially being ill in a hospital! Nurses started to chime in...and I simply said, "Hey have you guys ever thought of patients saying things about us? I bet they have quite some interesting if not down right awful things to say about us to their friends and family behind closed doors? Sometimes I would like to be a fly on the wall...bet that would be an eye opening experience!". That switched the convo on THINKING about the patient's perspective about us, and not just dissing the patient!!!!!! Its a start in a more positive direction...not fully positive, but a start to thinking about it and not just running at the mouth!
Another time, an elderly resident of mine grabbed my arm so tight as I was passing her in the hallway after a caregiver who happened to be black passed her. She said to me "Is that a N---- (horrid word!!!!)!!!!". I looked her straight in the eye and simply said 'YES'. and pulled her hand off me and walked away! I think that simple phrase showed two things...one, I wasn't going there!!! And two...to get over herself! It worked...I never had another probelm with residents ever again about different races at work (word must have gotten out not to go there!).