XWIKI-10036: It's possible to modify a document without getting a new entry in the history
* improvement

(cherry picked from commit 6e7919c5860633d4a5837d85992bd522152ee7d4)