CONTRIB-4728 Fixing problem with category visibility

Categories were created as hidden all the time with some
settings.