Thank you very much for answer.
I must admit i am a little overwhelmed by numbers of components in script. When i was writing my post i thought that there will be need of using 2-3 components. Now when i saw the answer i am glad that i asked- it would be ages before I solved it.
It might be worth investigating Entwine for this with “Flatten Inputs” disabled? (right-click option) But I haven’t looked at your code and the OP didn’t post any so…