A reexamination of the cosmological bound to the number of neutrino flavors