**Describe the bug**
Clickhouse fails to log users after changing groups at LDAP for one user

**Does it reproduce on recent release?**
I've checked It on 21.2.5.5 and 21.3.4.25

**How to reproduce**
E.g. there is LDAP user *user_1* and there are two LDAP groups *role_1* and *role_2*, which are mapped to the Clickhouse roles with the same names. 
At the beginning *user_1* is only at *role_1* group
1. Log *user_1* in by clickhouse-client and check grants:
```
SHOW GRANTS

┌─GRANTS─────────────────────────────────────────┐
│ GRANT role1 TO user_1 │
└────────────────────────────────────────────────┘
```
2. Exclude *user_1* from *role_1* and assign him to the *role_2* group
3.  Try to log him in by clickhouse-client again. Login process  hangs forever. Also other users can't log in too.

**Expected behavior**
User will have updated grants after the re-login

**Error message and/or stacktrace**
I found no logs for that :(

**Additional context**
Clickhouse on CentOS, freeipa as a LDAP

#pragma once
#include <Access/IAccessStorage.h>
#include <list>
#include <memory>
#include <mutex>
#include <unordered_map>
namespace DB
{
class MemoryAccessStorage : public IAccessStorage
{
public:
    static constexpr char STORAGE_TYPE[] = "memory";
    MemoryAccessStorage(const String & storage_name_ = STORAGE_TYPE);
    const char * getStorageType() const override { return STORAGE_TYPE; }
    
    void setAll(const std::vector<AccessEntityPtr> & all_entities);
    void setAll(const std::vector<std::pair<UUID, AccessEntityPtr>> & all_entities);
private:
    std::optional<UUID> findImpl(EntityType type, const String & name) const override;
    std::vector<UUID> findAllImpl(EntityType type) const override;
    bool existsImpl(const UUID & id) const override;
    AccessEntityPtr readImpl(const UUID & id) const override;
    String readNameImpl(const UUID & id) const override;
    bool canInsertImpl(const AccessEntityPtr &) const override { return true; }