[CODEFEST] LayoutLister can be still slow for very deep structures

Hi Máté,

This is the improvement we've talked about. I completely replaced LayoutLister's DFS implementation with a new one.

I also created a test case, I captured the test data from the original implementation to make sure that I wouldn't break anything.

Thanks for reviewing!

Cheers,
Laci.

/cc: @zsigmondrab