Habitat heterogeneity and dispersal: environmental and genetic patchiness