Thank you for your reply. Probably, pkg set -[no] cannot combine records of multiple packages (libglapi, libGL, gbm, libEGL and libglesv2) into one (mesa-libs). It means that pkg delete is mandatory. After deleting, the dependency needs to be reconnected by something.