Fix of the failure to report shlib-to-shlib missing dependencies for 'pkg check -B'

Re-posting the patch that went unanswered: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192606