Improve merge of records.