renameBetweenDBs calls cursor->next() and keeps track of an unowned RecordData. After it saves, commits, and restores, it attempts to insert the RecordData it was holding in a prior snapshot.
This is problematic because the RecordData can point to freed or overwritten memory.