Maintaining genetic diversity despite local extinctions: effects of population scale