Small speed up for InMemoryKeyValueDB. Tests of ODB now using it to be faster as well.