In @ClassTablePut()@ the class is currently inserted by hash in the RBTree, where hash is a @size_t@ integer:
return RBTreePut(table->classes, (void *)cls->hash, cls);
However collisions are not being handled. This will trigger random subtle bugs (like unexpected classes set). Ideally no hash at all should be used when inserting to an RBTree.
AFAICT RBTree hashes are being used for variables, classes, and cached functions, so all these should be susceptible to collisions.