Enforce access restrictions to deprecated code