It's more sustainable if you have US style welfare where benefits are things like wage subsidies, for a limited duration after employment, or in kind in some way like Medicaid or food stamps.
EDIT: I think I should point out that the tradeoff is that this way of doing welfare is less efficient but requires less trust.
Sure you can... you just have to not extend those benefits in full to new migrants. Europe seems slowly moving in that direction in response to this exact problem, though it's not straightforward as the current jurisprudence seems to regard this as an infringement on EU citizens' freedom of movement.
EDIT: I think I should point out that the tradeoff is that this way of doing welfare is less efficient but requires less trust.