cainteoir_document: fix the get document implementation