We consider the degree of conservation of nuclear spin polarization in the process of optical pumping under typical spin-exchange optical pumping conditions. Previous analyses have assumed that negligible nuclear spin precession occurs in the brief periods of time the alkali-metal atoms are in the excited state after absorbing photons and before undergoing quenching collisions with nitrogen molecules. We include excited-state hyperfine interactions, electronic spin relaxation in collisions with He and N_2, spontaneous emission, quenching collisions, and a simplified treatment of radiation trapping.