[backport] transactionalmap.values() now includes updated values within transaction

fixes #3668
minor improvement may be not using `HashSet` instead of `ArrayList`, if you don't need to calculate hash of objects.