more general method of controlling visibility of local functions or items marked with @local