[HttpKernel] Fix for getBundle function, not returning the right bundle when there is bundle inheritance

Hi

I've noticed that the getBundle function (in src/Symfony/Component/HttpKernel/Kernel.php) currently does not return the correct bundle when an application has bundle inheritance

Example:
GrandParentBunde > ParentBundle > ChildBundle

php app/console doctrine:generate:entities FOOGrandParentBundle
will generate the entities for ChildBundle

the same goes for:
php app/console doctrine:generate:entities FOOParentBundle
will generate the entities for ChildBundle

The translation:update command has the same issue.

I think the order of bundleMap must be inversed te make it work properly. This is because the getBundle function takes the first element of the bundleMap array when the second parameter "first" === true.

I've also updated the existing tests and added a test which really tests the getBundle method 


Kind regards
Hans Stevens