backport OSGi bridge fixes to 1.12