Sad, but true. Actually, the while statements would work, but they would stop prematurely without any particular reason. When I divided the while statement up into separate segments though, it seemed to work, and that really threw me off :/ because it shouldn't make a difference really.
Interesting observation from JCarter, considering the switch statement always works for me. In fact, it works so much better than if/else statements that all of the MVI modules use an onEnter script using a global in a switch statement. I was getting some weird results with if/else such as some statements would be completely overlooked despite the correct syntax.