[574049] Improve the detection of OSGi for determining the package
registry implementation
22 files changed