when the content is served as text/html it may have mapml content inside of it which gets parsed meaning the connectedcallback of all the possible mapml inside of it (i.e. map-features) happen when clicking on a query layer.
Example of a problematic layer that returns a mapml when queried -
<layer- label="Permanent snow and ice (prob. 94% or more) WMS GetMap" src="https://maps4html.org/experiments/datacube/msi-94-plus.mapml" checked=""></layer->
when the content is served as text/html it may have mapml content inside of it which gets parsed meaning the connectedcallback of all the possible mapml inside of it (i.e. map-features) happen when clicking on a query layer.
Example of a problematic layer that returns a mapml when queried -