BugReport using globals in sub for/next loop