@mctwist@0xabad1dea Bug: if I have two layers, one named "layer" and another named "layer copy" and I try to copy "layer", this code will try to create "layer copy", which already exists Solution: keep resolving until you have an unused name: while layerExists(layer_name) layer_name += " copy"