Looking at the specification, the "library mode" engages when SLD or SLD_BODY are used in conjuction with layers=xxx
In this case, the spec says (page 10):
"When an SLD is used as a style library, the STYLES CGI parameter is interpreted in the
usual way in the GetMap request, except that the handling of the style names is organized
so that the styles defined in the SLD take precedence over the named styles stored within
the map server. The user-defined SLD styles can be given names and they can be marked
as being the default style for a layer. To be more specific, if a style named
?CenterLine? is referenced for a layer and a style with that name is defined for the
corresponding layer in the SLD, then the SLD style definition is used. Otherwise, the
standard named-style mechanism built into the map server is used. If the use of a default
style is specified and a style is marked as being the default for the corresponding layer in
the SLD, then the default style from the SLD is used; otherwise, the standard default style
in the map server is used"
In fact UserStyle has a "isDefault" attribute, which we don't use in default_polygon.sld, so
according to the spec states should be rendered with its own default style since the
referenced SLD does not contain a default one.