The Stabilizing Effect of Intraspecific Genetic Variation on Population Dynamics in Novel and Ancestral Habitats