On the contrary. A welfare state will only survive an ethnically homogenous society. Take a look at the Scandinavian countries, for example. They have traditionally had very homogenous societies with massive social spending. However, as the number of immigrants has grown so has the opposition to wealth redistribution. The bottom line is these kind of social contracts are only possible if there's a very real sense of communality in the society.
In the US the political right, especially the Republican party, has been playing with the ethnic card against the welfare state for well over 30 years. It has worked quite well, also.