Steps to re-create problem
Create two Cascaded WMS Layer and do not configure any forced remote style and remove any supported style
Add both layers to a Layergroup
Preview the Layergroup
Result: Layergroup will fail because it will assume the local default style (raster) for Cascaded WMS and make it part of request internally. This will fail the check when "raster" name will be passed to WMSLayerInfo resource for validation.
For WMSLayerInfo not configured with any remote style, calling getDefaultStyle() should return an empty StyleInfo implementation with metadata including tag "isRemote".