[DF-3978] fixed visibility flags handling