Added mandatory flag to visiblity calcs.