Ok, so I was still tring to fix it, and in the proccess of fixing it, i *think* I may have discovered a bug... either that or I am confused about something. Anyway, I want to run it by the more experienced scripters before I file any kind of bug report.
I have replecated the proposed bug as...