Fix database index so that different backup versions can have the same sessions.