Bug #9308: fix impossible to remove a group in the legend

This PR fix a bug generated in PR #1010 which prevents to remove groups in the legend

Bug:
http://hub.qgis.org/issues/9308