I submitted the assignment and scored 90 so I’m not blocked, but it was obviously still happening. But the issue may be in the data and that’s a bit big to attach.
That was a dumb error and I’m somewhat surprised it didn’t matter later, though probably it only made things less efficient since I wasn’t padding all the way up to the next power of 2. However, for the test right after UNQ_C6 it wouldn’t matter - that test only calls next_symbol with 0 and 1 input tokens, and for 0 and 1 my mistaken line gave 1 and 2, which are correct. Also, I’ve corrected the error in the padding calculation and still get the same test failure (again, not surprising).