Adjusted tokenKindTable.expand() to not use local structures, and instead allocate on the heap.