Shadow map count higher than 3 breaks things
The hard limit of eight FFP texture slots was removed some time ago, but there is at least one line in the shadow map code that still cares about eight.
void ShadowManager::disableShadowsForStateSet(const Settings::ShadowsCategory& settings, osg::StateSet& stateset)
Increasing shadow map count to 7, many things related to sky and RTTs no longer rendered properly: