Both the "layers permalink" and the "highlight features permalink" functionalities may add layers to the map. And we cannot assume a specific order – both managers add layers in a gaLayersChange listeners.