Fix EZP-23584: Impossible to edit and publish the same content 2 times in a row

This is caused by https://github.com/yui/yui3/issues/1982 and the fix introduces
a workaround for that.