Repository: quarkusio/quarkus
Issue: Quarkus 2.0.1: Reflective access broken for Jackson (de)serialization / inheritance/polymorphism

## Describe the bug
We've bumped Quarkus from 2.0.0.Final to 2.0.1.Final and our integration-tests against a Quarkus native image build fail since Quarkus 2.0.1.

[Nessie commit with successful CI run before the Quarkus version bump](https://github.com/projectnessie/nessie/commit/ddde10d8fffdf59ab1000a4c87e2a8cc26adccf8)
[Nessie commit with failing CI run for the Quarkus version bump](https://github.com/projectnessie/nessie/commit/ddde10d8fffdf59ab1000a4c87e2a8cc26adccf8)

I've bisect'ed the changes and found that 0561a58ad83a42aeaa1695d206ca22558bc4ef33 causes the bug. Since JSON deserialization only fails against a native image but works fine in a "proper JVM", it makes sense that this Quarkus commit breaks something.

Jackson does some reflective access to find `builder()` and related methods. Quarkus' `ReflectiveHierarchyStep` provides the reflection-information for native images. Since Jackson cannot find these methods anymore, it errors out. It's related to polymorphism. Nessie's [`IcebergTable`](https://github.com/projectnessie/nessie/blob/main/model/src/main/java/org/projectnessie/model/IcebergTable.java) class is probably the first class being found (it's mentioned 1st  in the annotations) and it's reflection-information is correctly added and (de)serialization for that class workds - but other types like [`SqlView`](https://github.com/projectnessie/nessie/blob/main/model/src/main/java/org/projectnessie/model/SqlView.java) seem to be no longer processed since that commit, have no reflection information and therefore cause (de)serialization issues. Both classes extend [`Contents`](https://github.com/projectnessie/nessie/blob/040a2955834b8a263d55c2c32c0fd26d34e639c0/model/src/main/java/org/projectnessie/model/Contents.java).

Repro steps (the Quarkus version can be updated in the top-level-pom around line 135:
* Clone https://github.com/projectnessie/nessie
* `./mvnw clean install -DskipTests && ./mvnw clean install -Pnative -pl servers/quarkus-server/`

`git bisect` log:
```
# bad: [e21b905817188d19a76886847409020d0aa6b530] Add missing nexus-staging-maven-plugin.version to bootstrap parent pom
# good: [e8ceb2f63ac142ff57448aaa85279fe14ee2ab6d] Fix actionable error message in Quartz scheduling
git bisect start 'e21b905817188d19a76886847409020d0aa6b530' 'e8ceb2f63ac142ff57448aaa85279fe14ee2ab6d'
# good: [9c7030212f127bdd67f0907b8450d7371e00b97d] Introduce the ability to use deep mocks in @InjectMock
git bisect good 9c7030212f127bdd67f0907b8450d7371e00b97d
# good: [4c7618177932b16b5aa0e14a431aadb87e74f92a] Update log levels when running mvn quarkus:test
git bisect good 4c7618177932b16b5aa0e14a431aadb87e74f92a
# bad: [017d4fd71eb3f55d52008e018cf080b35dddbcd3] GraphQL client configuration rework
git bisect bad 017d4fd71eb3f55d52008e018cf080b35dddbcd3
# good: [1d1c273de101b9e0cc24dc183054e63c83d2d7f3] Registry client config (de)serialization tests and fixes
git bisect good 1d1c273de101b9e0cc24dc183054e63c83d2d7f3
# bad: [c23a65b44917d52edbdd4f7f9bcdd11c63a514ee] Add quarkus config properties for SmallRye GraphQL Client
git bisect bad c23a65b44917d52edbdd4f7f9bcdd11c63a514ee
# bad: [61b88690dee13bbd5112eeb706d31488865023ba] Fix native error with OTLP exporter for OpenTelemetry
git bisect bad 61b88690dee13bbd5112eeb706d31488865023ba
# bad: [0561a58ad83a42aeaa1695d206ca22558bc4ef33] Fixed StackOverflowError building reflective hierarchy
git bisect bad 0561a58ad83a42aeaa1695d206ca22558bc4ef33
# first bad commit: [0561a58ad83a42aeaa1695d206ca22558bc4ef33] Fixed StackOverflowError building reflective hierarchy
```

/cc @aloubyansky

Changed files:
core/deployment/src/main/java/io/quarkus/deployment/steps/ReflectiveHierarchyStep.java

diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/ReflectiveHierarchyStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/ReflectiveHierarchyStep.java
index 9bddde0f2df..050e5421b2c 100644
--- a/core/deployment/src/main/java/io/quarkus/deployment/steps/ReflectiveHierarchyStep.java
+++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/ReflectiveHierarchyStep.java
@@ -120,8 +120,7 @@ private void addReflectiveHierarchy(CombinedIndexBuildItem combinedIndexBuildIte
                 type instanceof UnresolvedTypeVariable) {
             return;
         } else if (type instanceof ClassType) {
-            if (reflectiveHierarchyBuildItem.getIgnoreTypePredicate().test(type.name())
-                    || processedReflectiveHierarchies.contains(type.name())) {
+            if (reflectiveHierarchyBuildItem.getIgnoreTypePredicate().test(type.name())) {
                 return;
             }