can you extract this in a new method, and make it run over `collectionPersisters` and `persisters` if `$hasCache=true`? This might trigger afterTransactionComplete() on a bit more persisters than necessary, but it avoids having the additional state and removes alot of code from the UnitOfWork.