XWIKI-10564: Overridden document not saved in recycle bin anymore

(cherry picked from commit a1e9dd27bbaaa17b0844dcb6a4dd5cf1e21870d7)