This will be fixed purely in 4.2 and 4.3. 5.x's OSGi classloader handling has significantly changed, so this will be handled in HHH-9818 through a different approach.