Implications of habitat choice for protected polymorphisms