Revert code changes to sys_GetDocumentList

Changes from the last merge caused 6.4 code to be reverted. Updated
master.