Would it be possible to post your full-code? It’s impossible to troubleshoot your problem with the example, and it seems from your description that there may be no need for many nested loops. A more full description as to your goals would also be helpful.
🙂