I'm not sure indexing the stylesheets by priority is a good idea, if by chance, you have the same priority for two stylesheets (think two external bundles), one won't be loaded and it will be very difficult to understand why.