Fixed an occasional segfault when saving the symbol table.