A fix for non internal WMS layers (like WMTS).