Thanks for the detailed post, you confirmed what I had thought.
Your above mod to the script is invaluable.
However, I spent a fair amount of time last night trying to fix the problem, but no matter what I did the result was always the same. The cia came out as v0. Either I'm doing something...