Fixed Database#getDocumentByKey to properly work with keys that are
already UNIDs