Bug 862268 - 1/2: fix omitted message id update in saveRecord.
Bug 862268 - 2/2: test cases.