Linguist here: to be fair, it has taken on a racist connotation of "white person" but it did actually mean, previously, anyone who was a foreigner. But words change, and meanings change, and now it's most often used in a racist manner.