Evolution in Fine-Grained Environments. II. Habitat Selection as a Homeostatic Mechanism