Quantifying the degree of gene reuse during local adaptation