Can you not use document_find_by_id() as is recommended by the API docs?
document_find_by_id()
But, as its documented to be in the API it looks simply like its a bug.
—Reply to this email directly or view it on GitHub.