fix #407 - visibility of hierarchy ignored and also check for measure visibility