I decided to give AbstractResourceAggregatingHeaderResponse a try but I found a problem in its design that, I think, makes it unusable.
How it works:
2-When close() is called on the response, the aggregator writes out all the accumulated resource references which have not been rendered yet. This step can be used to group multiple resources into a single merged resource.
AbstractDefaultAjaxBehavior#renderHead() does the following :
This problem also applies to css resource references because order of inclusion is important for them too.
The problem is also present in AbstractDependencyRespectingResourceAggregatingHeaderResponse.