fix scope of layer variable, remove unneeded visibility temporary storage (was used in case of layer not visible
Merge pull request #625 from camptocamp/fix-laytree-visibility-fix

fix scope of layer variable, remove unneeded visibility temporary storage (was used in case of layer not visible