Conservation of the spin angular momentum in second-harmonic generation with elliptically polarized vortex beams