Fixed a bug that after finding a non-dataset document, then go back to find dataset document for it in xml_relation table.
Fixed a bug that after finding a non-dataset document, then go back to find dataset document for it in xml_relation table.