Dispersal and the evolution of specialisation in a two-habitat type metapopulation