XWIKI-9309: Also search in attachments when type is DOCUMENT
* Fix test failure due to nondeterministic order.