Fixed bug

Fixed bug where method-based clearing of SessionCache would fail because
the iterator accesses an already deleted key. Or something like that.