Problem With Looping

Hi everyone,
I’ve been working on a GH file in which i use a couple of loops (not nested). the first loop works great and the second one doesn’t.
The second loop is basically a branch selector and recorder, where the loop count is used to make the paths. The loop can’t be activated, apparently since the tree has some empty or missing branches. is there a way to get the loop to run and return either nulls or empty branches?
the Branch Numbers are crucial for the future use of the code.

Tconculating_precentage.gh (248.0 KB)
hanks for any future help