The current implementation of symbol tables is hard to understand and probably needlessly complex. Refactoring it could be helpful.