Hi @H_Kramer,
you can try to use this solution if you flatten your tree (but that may have other consequences later in your script ).
Duplicate surfaces.gh (10.8 KB)
Having said this, you may need to consider why you are getting those duplicate surfaces, to make everything easier