Use PersistentSymbolTable after all
The performance is almost the same and the code is much more simpler.