Ignore layers that do not exist when clearing layers.