Uncertainty, Gains from Specialization and the Welfare State