Correctly update layer control when moving <map-extent> up/down by re-ordering it among sibling <map-extent>s
Steps to reproduce
Load this experiment
Open devtools Elements panel
Select / highlight the third <map-extent> in the "National Geographic" layer (label="Imagery")
In the console drawer, execute this:
let imagery = $0
Select / highlight the first <map-extent> in the "National Geographic" layer (label="National Geographic")
In the console drawer, execute this:
$0.insertAdjacentElement('afterend',imagery)
What happens:
The <map-extent label="Imagery"> is moved to the second DOM position, but it disappears from the layer control altogether.
What should happen:
The <map-extent label="Imager"> is moved to the second DOM position, and it should be the second sub-layer in the "National Geographic" layer in the layer control.