The main task was to investigate the source of the problem mentioned in Impediments to Chess960 Acceptance. Did I just happen to stumble on the only error in the original code or were there more? I extracted the ID/position equivalences, compared them to my database of SPs, and found a dozen discrepancies. The most obvious error was the assignment of SP000 (BBQNNRKR) to no.960, because the standard numbering scheme starts at 000 and ends at 959. As for the other errors, they were all incorrect ID/position equivalences scattered at random in the IF/THEN tables.
I replaced all the original equivalences with my own, made a few other changes, and added the position generator to my page of Chess960 Start Positions. On top of a working chess960 generator, I have a foundation for any related ideas that might come along.