Fix the layer visibility

When we click on the last layer group the layer still be visible with
the layers ...
Merge pull request #634 from camptocamp/fix-layerparam

Fix the layer visibility