Session#getStyle is not considered when a mounted package resource is loaded. Wicket loads the default one.
If the resource is not mounted, everything works fine and Wicket delivers the correct resource file.
Quickstart is attached. There are two CSS files: styled.css and styled_orange.css. The corresponding package resource is mounted. The session style is set to orange in WicketApplication#newSession. Expected behavior is that styled_orange.css is delivered to a browser. Instead styled.css is delivered.
There is a workaround: see WorkaroundResourceStreamLocator.