So, you’re writing a book set in the year X. You have looked up sources of slang from X, to give the book a more authentic feel.
You make semi-frequent use of a specific term. In context, said term is fairly innocuous. It is not, however, a term commonly used today, so you can be fairly sure that most readers are only going to know its meaning based on your context.
However, you then discover that, in certain locations, said word is still used today. Today, however, its meaning is not what it used to be; it is, today, a fairly disgusting racial insult. And unfortunately, if any readers decide to look up said word–not knowing what it meant in your historical context–this newer definition is likely to be the first they come across.
Do you keep using the term, since it’s historically accurate, and trust that people will understand that you’re not using it in its modern context? Or do you suck it up and replace said word, so as not to cause either offense or confusion?