Improved visibility checks
Merge pull request #224 from ondrejhanslik/visibility-checks

Improved visibility checks