Local adaptation and gene-for-gene coevolution in a metapopulation model