Evolutionary history of the recruitment of conserved developmental genes in association to the formation and diversification of a novel trait