Intragenerational externalities and intergenerational transfers