Factored out common code in some replacement mutation operators.