XWIKI-9807: Confluence import fails for attachments with several versions

(cherry picked from commit b37475d1076eccdc51efb194fd419fa12c025761)