ISPN-5104 Infinite loop in TransactionAwareCloseableIterator when
iterating through cache

Fixed issue where entry was repeated if added to context after
starting a transaction
ISPN-2796 Another scenario with dependencies between components still fails