Why does Hibernate marks entity's ElementCollection as dirty when there are no changes?

How do you determine that Hibernate ORM thinks the collection is dirty? I assume that whatever you are using to apply a patch is creating new objects for collection elements and Hibernate ORM doesn’t bother checking if a collection element is deeply equal to an element of the initial state.
To avoid unnecessary update statements you’d have to avoid replacing objects in that case.