Inserting here is no problem. But I think more better place is around line 340:

```cpp
        // Add to symbol table only after evaluating 'value'
        if (isAnonymous() && !sc->func)
        {
            // already inserted to enclosing scope in addMember
        }
        else
        {
            em->ed = this;   // <--
            em->addMember(sc, scopesym, 1);
        }
```

There is consistent with the setting `em->ed` in `EnumDeclaration::addMember`.