ISPN-3936 State transfer should not modify or iterate shared cache stores

The entries were only removed from the data container, but the store was
still iterated on even when it was shared.