Very sorry. I wondered a bit at how detailed to paste code and decided to err on the side of brevity. I did not post actual full code, but tried to boil it down to just what was troubling me from a much larger program. I did not try to re-run it after hacking. In the future I'll try to err on the side of completeness.
On the up side, in the interest of more complete communications, I created a user! I'm trying to read about the scratchpad, etc and figure out how things work around here. I humbly seek patience in the mean time.
I'll post complete code separately and redescribe the problem.