Gene duplication
Normally, a big change in gene function is resisted because the original function is needed, but after a duplication one gene carries on the original function. Therefore, a change of function in the second copy is possible without loss of fitness.