It does something as long as `wmsLayers` is set in `l`, which is true if

* `wmsUrl` is set in the db record, or
* `wmsLayers` is set in the db record, or
* both `wmsUrl` and `wmsLayers` are set in the db record.

Does that answer? (I'm not sure I understand your question.)