How can I change the order of CSS files to load module's CSS before theme's CSS? Here are some code examples:
Theme's CSS file (loaded on all pages) added in theme's local.xml:
<default>
    <reference name="head">
        <action method="addItem">
            <type>skin_css</type>
            <name>css/theme.css</name>
        </action>
    </reference>
</default>
Extension's CSS file (loaded only on category pages) added in module's XML layout file:
<catalog_category_layered>
    <reference name="head">
        <action method="addItem">
            <type>skin_css</type>
            <name>css/extension.css</name>
        </action>
    </reference>
</catalog_category_layered>
This is the order of loaded CSS files which I get on the category page, extension's CSS is loaded after theme's CSS:
- /default/mytheme/css/styles.css
 - /default/mytheme/css/theme.css
 - /default/mytheme/css/extension.css
 
What I'm trying to achieve: extension's CSS is loaded before theme's CSS.
How can I force this order of CSS files:
- /default/mytheme/css/styles.css
 - /default/mytheme/css/extension.css
 - /default/mytheme/css/theme.css
 
I've noticed that if I have many extensions installed, CSS of some extensions loads before theme's CSS and CSS of some other extensions loads after theme's CSS. I assume that it has something to do with the order of modules in Magento, but I don't understand how I can affect the order of CSS (or JavaScript) files on the frontend.