The genetic consequences of changing reproductive behaviour