LinkageError when hot reloading project using classes in external dependencies
### Describe the bug

I have following structure in my reproducer project:

External dependency:
* A class called Configuration. This is a simple pojo, no cdi bean
* META-INF/beans.xml file

Quarkus project:
* ConfigurationProducer - a cdi producer, creating an applicationscoped instance of the Configuration
* ConfigurationValidator - Startup bean, which validates the produced Configuration in an PostConstruct
* GreetingResource - a simple inject of the Configuration

On first quarkus:dev, this app starts flawlessly.
If I now hot reload, I get the exception from below.

This only happens with 2.7.0.CR1.
With 2.6.3.Final, this exception did not happen.

### Expected behavior

No exceptions when hot reloading, like in 2.6.3.Final

### Actual behavior

```
2022-01-25 09:30:46,446 INFO  [io.quarkus] (Quarkus Main Thread) hot-reload-producer stopped in 0.013s
__  ____  __  _____   ___  __ ____  ______
 --/ __ \\/ / / / _ | / _ \\/ //_/ / / / __/
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\\ \\
--\\___\\_\\____/_/ |_/_/|_/_/|_|\\____/___/
2022-01-25 09:30:48,222 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.LinkageError: loader constraint violation: when r
esolving method 'void com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_ClientProxy.<init>(org.acme.ConfigurationProducer_ProducerMet
hod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean)' the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @73843e83 of the current class, org/acme/Configurati
onProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean, and the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4461c7e3 for the method's 
defining class, com/acme/spi/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_ClientProxy, have different Class objects for the type org/acme/Con
figurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean used in the signature (org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125
f3f16fd0e1923dbf7b49ecb1a_Bean is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @73843e83, parent loader io.quarkus.bootstrap.classloading.QuarkusCla
ssLoader @4461c7e3; com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_ClientProxy is in unnamed module of loader io.quarkus.bootstrap
.classloading.QuarkusClassLoader @4461c7e3, parent loader 'app')
        at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.proxy(Unknown Source)
        at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
        at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
        at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
        at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
        at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:101)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
        at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
        at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:18)
        at org.acme.ConfigurationValidator_ClientProxy.arc$delegate(Unknown Source)
        at org.acme.ConfigurationValidator_ClientProxy.arc_contextualInstance(Unknown Source)
        at org.acme.ConfigurationValidator_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.notify(Unknown Source)
        at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:320)
        at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:302)
        at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:73)
        at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:128)
        at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:97)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy(Unknown Source)
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:104)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
        at io.quarkus.runner.GeneratedMain.main(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:103)
        at java.base/java.lang.Thread.run(Thread.java:833)


2022-01-25 09:30:48,223 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (Aesh InputStream Reader) Failed to start quarkus: java.lang.RuntimeException: java.lang.RuntimeException: Failed to 
start quarkus
        at io.quarkus.dev.appstate.ApplicationStateNotification.waitForApplicationStart(ApplicationStateNotification.java:51)
        at io.quarkus.runner.bootstrap.StartupActionImpl.runMainClass(StartupActionImpl.java:122)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.restartApp(IsolatedDevModeMain.java:233)
        at io.quarkus.deployment.dev.IsolatedDevModeMain.restartCallback(IsolatedDevModeMain.java:214)
        at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:522)
        at io.quarkus.deployment.console.ConsoleStateManager.forceRestart(ConsoleStateManager.java:141)
        at io.quarkus.deployment.console.ConsoleStateManager.lambda$installBuiltins$0(ConsoleStateManager.java:98)
        at io.quarkus.deployment.console.ConsoleStateManager$1.accept(ConsoleStateManager.java:73)
        at io.quarkus.deployment.console.ConsoleStateManager$1.accept(ConsoleStateManager.java:46)
        at io.quarkus.deployment.console.AeshConsole.lambda$setup$1(AeshConsole.java:249)
        at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:118)
        at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:31)
        at org.aesh.terminal.io.Decoder.write(Decoder.java:133)
        at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:216)
        at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:203)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: Failed to start quarkus
        at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
        at io.quarkus.runtime.Application.start(Application.java:101)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:104)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:67)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:41)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:120)
        at io.quarkus.runner.GeneratedMain.main(Unknown Source)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:103)
        ... 1 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'void com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7
b49ecb1a_ClientProxy.<init>(org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean)' the class loader io.quarkus.bootstrap.classloading.Q
uarkusClassLoader @73843e83 of the current class, org/acme/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean, and the class loader io.quarkus
.bootstrap.classloading.QuarkusClassLoader @4461c7e3 for the method's defining class, com/acme/spi/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb
1a_ClientProxy, have different Class objects for the type org/acme/ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean used in the signature (o
rg.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader
 @73843e83, parent loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4461c7e3; com.acme.spi.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b4
9ecb1a_ClientProxy is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4461c7e3, parent loader 'app')
        at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.proxy(Unknown Source)
        at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
        at org.acme.ConfigurationProducer_ProducerMethod_configure_583a1d0f9a47125f3f16fd0e1923dbf7b49ecb1a_Bean.get(Unknown Source)
        at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
        at org.acme.ConfigurationValidator_Bean.create(Unknown Source)
        at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:101)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
        at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
        at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:18)
        at org.acme.ConfigurationValidator_ClientProxy.arc$delegate(Unknown Source)
        at org.acme.ConfigurationValidator_ClientProxy.arc_contextualInstance(Unknown Source)
        at org.acme.ConfigurationValidator_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.notify(Unknown Source)
        at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:320)
        at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:302)
        at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:73)
        at io.quarkus.arc.runtime.ArcRecorder.fireLifecycleEvent(ArcRecorder.java:128)
        at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:97)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent1144526294.deploy(Unknown Source)
        ... 13 more


2022-01-25 09:30:48,243 INFO  [io.qua.dep.dev.RuntimeUpdatesProcessor] (Aesh InputStream Reader) Live reload total time: 1.817s
```

### How to Reproduce?

1. Download the reproducer: 
[hot-reload-reproducer-spi.zip](https://github.com/quarkusio/quarkus/files/7931939/hot-reload-reproducer-spi.zip)

2. cd spi
3. mvn clean install
4. cd ../hot-reload-producer
5. mvn clean compile quarkus:dev
6. press s for a force restart
7. exception form above happens. The same exception happens on a normal hot reload as well.
8. downgrade to 2.6.3.Final, and start again
9. No exception on force restart


### Output of `uname -a` or `ver`

MSYS_NT-10.0-19043 NANB7NLNVP2 3.1.7-340.x86_64 2021-03-26 22:17 UTC x86_64 Msys

### Output of `java -version`

openjdk 17 2021-09-14 OpenJDK Runtime Environment Temurin-17+35 (build 17+35) OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing)

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.7.0.CR1

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: C:\\eclipse\\tools\\apache-maven Java version: 17, vendor: Eclipse Adoptium, runtime: C:\\eclipse\\tools\\java\\17 Default locale: de_DE, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

### Additional information

_No response_
diff --git a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java b/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java
deleted file mode 100644
index 4ebf0abe4de..00000000000
--- a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package io.quarkus.arc.test.unproxyable;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import java.io.IOException;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Instance;
-import javax.enterprise.inject.Produces;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-import io.quarkus.arc.test.unproxyable.some.Resource;
-import io.quarkus.test.QuarkusUnitTest;
-
-// This test aims to test the https://github.com/quarkusio/quarkus/issues/22815 in Quarkus integration
-// There is a duplicate test for ArC standalone: io.quarkus.arc.test.clientproxy.constructor.ProducerReturnTypePackagePrivateNoArgsConstructorTest
-public class ProducerReturnTypePackagePrivateNoArgsConstructorTest {
-
-    @RegisterExtension
-    static final QuarkusUnitTest config = new QuarkusUnitTest()
-            .withApplicationRoot(root -> root
-                    .addClasses(ProducerReturnTypePackagePrivateNoArgsConstructorTest.class, ResourceProducer.class,
-                            Resource.class));
-
-    @Inject
-    Instance<Resource> instance;
-
-    @Test
-    public void testProducer() throws IOException {
-        assertTrue(instance.isResolvable());
-        assertEquals(5, instance.get().ping());
-    }
-
-    @Singleton
-    static class ResourceProducer {
-
-        @ApplicationScoped
-        @Produces
-        Resource resource() {
-            return Resource.from(5);
-        }
-
-    }
-
-}
diff --git a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/some/Resource.java b/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/some/Resource.java
deleted file mode 100644
index de4455f18f6..00000000000
--- a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/some/Resource.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package io.quarkus.arc.test.unproxyable.some;
-
-public abstract class Resource {
-
-    Resource() {
-    }
-
-    public static Resource from(int ping) {
-        return new Resource() {
-
-            @Override
-            public int ping() {
-                return ping;
-            }
-        };
-    }
-
-    public abstract int ping();
-
-}
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanDeployment.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanDeployment.java
index 786837e2c0b..8c34ecf0969 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanDeployment.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanDeployment.java
@@ -895,7 +895,7 @@ private List<BeanInfo> findBeans(Collection<DotName> beanDefiningAnnotations, Li
 
             // non-inherited stuff:
             for (MethodInfo method : beanClass.methods()) {
-                if (method.isSynthetic()) {
+                if (Methods.isSynthetic(method)) {
                     continue;
                 }
                 if (annotationStore.getAnnotations(method).isEmpty()) {
@@ -922,7 +922,7 @@ private List<BeanInfo> findBeans(Collection<DotName> beanDefiningAnnotations, Li
             while (aClass != null) {
                 for (MethodInfo method : aClass.methods()) {
                     Methods.MethodKey methodDescriptor = new Methods.MethodKey(method);
-                    if (method.isSynthetic() || Methods.isOverriden(methodDescriptor, methods)) {
+                    if (Methods.isSynthetic(method) || Methods.isOverriden(methodDescriptor, methods)) {
                         continue;
                     }
                     methods.add(methodDescriptor);
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java
index 8c012e64800..678eb0f7018 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java
@@ -1793,7 +1793,7 @@ protected void implementIsSuppressed(BeanInfo bean, ClassCreator beanCreator) {
 
     private String getProxyTypeName(BeanInfo bean, String baseName) {
         StringBuilder proxyTypeName = new StringBuilder();
-        proxyTypeName.append(bean.getClientProxyPackageName());
+        proxyTypeName.append(bean.getTargetPackageName());
         if (proxyTypeName.length() > 0) {
             proxyTypeName.append(".");
         }
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java
index d9f1bc15ca8..98a89c8cacc 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java
@@ -492,22 +492,6 @@ public String getTargetPackageName() {
         return packageName;
     }
 
-    public String getClientProxyPackageName() {
-        if (isProducerField() || isProducerMethod()) {
-            AnnotationTarget target = getTarget().get();
-            DotName typeName = target.kind() == Kind.FIELD ? target.asField().type().name()
-                    : target.asMethod().returnType().name();
-            String packageName = DotNames.packageName(typeName);
-            if (packageName.startsWith("java.")) {
-                // It is not possible to place a class in a JDK package
-                packageName = AbstractGenerator.DEFAULT_PACKAGE;
-            }
-            return packageName;
-        } else {
-            return getTargetPackageName();
-        }
-    }
-
     void validate(List<Throwable> errors, List<BeanDeploymentValidator> validators,
             Consumer<BytecodeTransformer> bytecodeTransformerConsumer, Set<DotName> classesReceivingNoArgsCtor) {
         Beans.validateBean(this, errors, validators, bytecodeTransformerConsumer, classesReceivingNoArgsCtor);
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ClientProxyGenerator.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ClientProxyGenerator.java
index 3e8ebe33560..62a7320b42b 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ClientProxyGenerator.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ClientProxyGenerator.java
@@ -78,22 +78,13 @@ public ClientProxyGenerator(Predicate<DotName> applicationClassPredicate, boolea
     Collection<Resource> generate(BeanInfo bean, String beanClassName,
             Consumer<BytecodeTransformer> bytecodeTransformerConsumer, boolean transformUnproxyableClasses) {
 
-        DotName testedName;
-        // For producers we need to test the produced type
-        if (bean.isProducerField()) {
-            testedName = bean.getTarget().get().asField().type().name();
-        } else if (bean.isProducerMethod()) {
-            testedName = bean.getTarget().get().asMethod().returnType().name();
-        } else {
-            testedName = bean.getBeanClass();
-        }
-        ResourceClassOutput classOutput = new ResourceClassOutput(applicationClassPredicate.test(testedName),
+        ResourceClassOutput classOutput = new ResourceClassOutput(applicationClassPredicate.test(bean.getBeanClass()),
                 generateSources);
 
         ProviderType providerType = new ProviderType(bean.getProviderType());
         ClassInfo providerClass = getClassByName(bean.getDeployment().getBeanArchiveIndex(), providerType.name());
         String baseName = getBaseName(bean, beanClassName);
-        String targetPackage = bean.getClientProxyPackageName();
+        String targetPackage = bean.getTargetPackageName();
         String generatedName = generatedNameFromTarget(targetPackage, baseName, CLIENT_PROXY_SUFFIX);
         if (existingClasses.contains(generatedName)) {
             return Collections.emptyList();
diff --git a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java
index e43012e89b1..f2e4453b343 100644
--- a/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java
+++ b/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java
@@ -42,9 +42,10 @@ final class Methods {
     public static final String INIT = "<init>";
     // static initializer
     public static final String CLINIT = "<clinit>";
+    // copied from java.lang.reflect.Modifier.SYNTHETIC
+    static final int SYNTHETIC = 0x00001000;
     // copied from java.lang.reflect.Modifier.BRIDGE
     static final int BRIDGE = 0x00000040;
-
     public static final String TO_STRING = "toString";
 
     private static final List<String> IGNORED_METHODS = initIgnoredMethods();
@@ -59,6 +60,10 @@ private static List<String> initIgnoredMethods() {
     private Methods() {
     }
 
+    static boolean isSynthetic(MethodInfo method) {
+        return (method.flags() & SYNTHETIC) != 0;
+    }
+
     static boolean isBridge(MethodInfo method) {
         return (method.flags() & BRIDGE) != 0;
     }
diff --git a/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java b/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java
deleted file mode 100644
index 8fa51503cc2..00000000000
--- a/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package io.quarkus.arc.test.clientproxy.constructor;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-import io.quarkus.arc.Arc;
-import io.quarkus.arc.ClientProxy;
-import io.quarkus.arc.test.ArcTestContainer;
-import io.quarkus.arc.test.clientproxy.constructor.some.Resource;
-import java.io.IOException;
-import javax.enterprise.context.ApplicationScoped;
-import javax.enterprise.inject.Produces;
-import javax.inject.Singleton;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-// This test aims to test the https://github.com/quarkusio/quarkus/issues/22815 in ArC standalone
-// There is a duplicate test for Quarkus integration: io.quarkus.arc.test.unproxyable.ProducerReturnTypePackagePrivateNoArgsConstructorTest
-public class ProducerReturnTypePackagePrivateNoArgsConstructorTest {
-
-    @RegisterExtension
-    public ArcTestContainer container = new ArcTestContainer(ResourceProducer.class);
-
-    @Test
-    public void testProducer() throws IOException {
-        Resource res = Arc.container().instance(Resource.class).get();
-        assertNotNull(res);
-        assertTrue(res instanceof ClientProxy);
-        assertEquals(5, res.ping());
-    }
-
-    @Singleton
-    static class ResourceProducer {
-
-        @ApplicationScoped
-        @Produces
-        Resource resource() {
-            return Resource.from(5);
-        }
-
-    }
-
-}
diff --git a/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/some/Resource.java b/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/some/Resource.java
deleted file mode 100644
index e45ce995299..00000000000
--- a/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/some/Resource.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package io.quarkus.arc.test.clientproxy.constructor.some;
-
-public abstract class Resource {
-
-    Resource() {
-    }
-
-    public static Resource from(int ping) {
-        return new Resource() {
-
-            @Override
-            public int ping() {
-                return ping;
-            }
-        };
-    }
-
-    public abstract int ping();
-
-}
['independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanDeployment.java', 'extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/some/Resource.java', 'independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/some/Resource.java', 'independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanGenerator.java', 'independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/BeanInfo.java', 'independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ClientProxyGenerator.java', 'independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/constructor/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java', 'independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/Methods.java', 'extensions/arc/deployment/src/test/java/io/quarkus/arc/test/unproxyable/ProducerReturnTypePackagePrivateNoArgsConstructorTest.java']