Fixing ref-counting memtables