Glad to help!
I'm guessing someone from Esri will see this but what do you want them to do? I mean, the problem was a syntax error in your code. Granted, it resulted in the API acting kind of strange but the source of the issue was your code. Maybe you should still contact support if you think this is a legitimate bug.