Welfare dependence within and across generations