I found something strange in how GeoServer serves WMS, specifically how it draws donut polygons. When the whole polygon is inside WMS GetMap request BBOX, the inner hole of donut polygon is filled. When part of the polygon falls outside WMS request BBOX, the inner hole is not filled.
Is it a bug, a feature or am I doing something wrong?