Fixes sorting of the results of expand based on newer key value structure.
Ensures that if the database is reopened that the enquire has access to the current backend.   Previously the retry loop would be exhausted immediately.
Merge pull request #6 from 7footmoustache/master

Fixes sorting of the results of expand based on newer key value structure