XWIKI-7947: Attaching a file after a rollback restores previous attachments.
(cherry picked from commit 0e9d075f124b2074bbe2ac3055d15cb70acd131e)