Sorry, I don’t quite understand what your issue is. In particular, I don’t understand the problem here:

so after the first iteration I deleted an occurence of block1 I won’t be able to access the node again.

Could you elaborate a bit more?