A theoretical analysis of population genetics of plants on restored habitats