fix data corruption in RdbMem buffer
when running with threads disabled.