Considering the song "Yankee Doodle Dandy" was intended to *satirize* the American Revolutionaries, it seems that Yosemite Sam is a bit too quick to hear a word and assume that the one using it is in favor of the people who that represents. This is like assuming that someone shouting "Fag!" is in favor of homosexuality.
When they aired on Nickelodeon in the late 80s/early 90s a few of the "Censored 11" Looney Tunes were shown, including this one. They must've caught the blackface reference in time (because they didn't on a few others).