Using a memory database would mean we don't need this logic.