Gene flow and local adaptation in two endemic plant species