Cube Generation - Infinite Loop Problem

Afternoon all,
Thanks for taking a look at my problem!

I am currently toying around with some very small scale cubed map generation and seem to have come across a bit of a stumbling block, which has had me racking my brian for nearly a week trying to come up with solution to get around this infinite loop problem. At the moment, I am generating blocks using the instanced static mesh component which poses a few problems in regards to storing previous column heights and things, hence why I am trying to implement this work-around.

So the following break-down is a overview of how it should work:

1.0 Add x number of cubes to the right and left of the ‘Master Cube’. [Working]
2.0 For each cube added in step 1, add x number of cubes above array item. [Working]
3.0 Add x rows of cubes infront of ‘Master Cube’ to create rectagular play area. [Working]
4.0 For each cube added in step 3, carry out a line trace to identify if there is a blocking hit to the left of the cube, if TRUE then add cube above array item, if FALSE then stop adding cubes above array item and delete the last added cube. [Not Working]

Step 4 is where I am running into problems, as I need the adding of cubes above the array item to continue until the line trace returns a false blocking hit and I just cant seem to jimmie anything together which will not kick up an infinite loop warning.

Below is a snapshot of the blueprint as is, I have added and removed so many different variations of branches and while loops that I had thought would work but I have had no real success thus far. So the image is just the general operation without the looping involved, hence why I have come to you guys to recommend a suitable method.

Link for ease: http://i.imgur.com/py5sqKp.jpg

My problem seems to be detecting when the line traces are coming up false and then getting out of the loop with that item of the array, if that makes any sense? For example, we enter step 4 of the process and start adding instacnes above item 1 of the array, then once the line trace returns a false a boolean variable would switch to false, completing the while loop, however I need to be able to enter that loop again with the second item of the array, so I set the boolean variable to true for each item of the array and I believe this is where the infinite loop is originating.

Ach, I dont know but if anybody would like to take a look at the wall of text above and try and help out, that would be greatly appreciated!

Thanks,
Connor.