carving: fix setupLayers to not reuse layer