protected function orderBundles()
    {
        // Gives a score to each bundle
        $order = array();
        foreach ($this->overridedBundles as $overriderBundle => $overridedBundles) {

            // An overrider bundle enters in the compilation, but takes any point
            if (!array_key_exists($overriderBundle, $order)) $order[$overriderBundle] = 0;

            // An overrided takes a point everytime is found
            foreach ($overridedBundles as $overriderBundle => $overridedBundle) {
                if (array_key_exists($overridedBundle, $order)) {
                    $order[$overridedBundle] = $order[$overridedBundle] + 1;
                }
                else {
                    $order[$overridedBundle] = 1;
                }
            }
        }

        arsort($order);

        // Arranges the bundles entries
        foreach ($order as $bundleName => $pos) {
            $bundle = $this->bundles[$bundleName];
            unset($this->bundles[$bundleName]);
            $this->bundles[$bundleName] = $bundle;
        }
    }