I don't know, if the only way it works is to select nested objects, then I think lisp won't work. And if there is no way you can get the desired outcome by manually typing commands, I also don't think lisp will work for you. My last suggestion is just to double check options on number of "n" before OK to get desired nesting, in my test I had a hard time due to highlight not being clear and it was one less than I expected. From your output, block 5 is nest level 2, which I think would be just zero or one "n", not two as you show.