Compile Error: Macro returns error with Add Child node on branch

I need explenation why my macro return error sometimes… Is it a bug, what is the logic begind it.

But other macro works fine and "Add Child " does not return error. I tested it and it works fine.:

I also made a function and it works fine. I just copied and pasted macro to function.

I need this to be a macro to benefit from multiple returns. Bug or what? What is my mistake?
Thank you!!! :slight_smile:

Edit: This is my first post, sorry if I it is wrong section.

Any one please?