Remove further duplicated code from replacement operators.