Rapid niche expansion by selection on functional genomic variation after ecosystem recovery