Ensure DOM element is removed when layer is removed