Effect of holes on the dynamic polarization of nuclei in semiconductors