Fix flakiness in beatrix tests because of class loader issues when running OSGI plugin tests