Thanks Eth. I don't think it's a bug in the code, though. I think it's more of an AS bug. I boiled it down to like 5 lines of code and it's clear that it's not my fault.
I am happy to send you the code once this is resolved, though - I welcome any help I can get.