When rollbacking a document with an object that is not in the rollbacked version the object is not deleted from the database and will ressurect after a flush cache.
How to test:
1/ Create a document (version 1.1)
2/ Add a TagClass object (object 0) (version 1.2)
3/ Add a TagClass object (object 1) (version 1.3)
4/ Delete TagClass object 0 (version 1.4)
5/ Rollback to version 1.2. You see only the TagClass object 0 but in realiy TagClass object 1 is not deleted from the database
6/ Flush cache
7/ View objects: TagClass object 0 and 1 are there. TagClass object 1 is ressurected and should not
We need to cleanup all objects from the DB on a rollback..