Fix test failures caused by classpath container state leaking between tests