Calculations of nuclear stability assume the nucleus exists in isolation. In particular, it is not surrounded by a sea of other particles. i.e. It is a zero density approximation. If you do put nuclei in a high density environment with degenerate fermion gases of electrons and neutrons then you find that the whole calculation of nuclear stability is changed, because the most stable nuclei will be those which minimise the energy density of the entire system. This is the situation that we find in the crusts of neutron stars. At increasing densities, increasingly neutron-rich nuclei become stable, since their beta decay is suppressed by the surrounding gas of relativistically degenerate electrons that occupy all the accessible electron energy states. At even higher densities, free neutrons become stable and ultimately the dominant component of the gas; their beta decay is suppressed for similar reasons.