Flattening to get unique nodes within n steps

Nice! glad it worked for you!

Cheers.