`layer.get('type') == 'KML' && layer.get('url')`?

You already use something close in updateLayersParam. And I don't think you need to make the layerFilter function more restrictive, as updateLayersParam will exclude layers that are not permalink-compatible.