Repository: quarkusio/quarkus
Issue: Regression: `SRCFG00011: Could not expand value` exception

### Describe the bug

There appears to be a regression in Quarkus 2.12.0.CR1 in the area of SmallRye Config.

I have a simple application which only uses `quarkus-resteasy-reactive` and `quarkus-security` and the following `application.properties` file:

```properties
quarkus.http.auth.permission.quarkus.paths=${quarkus.http.non-application-root-path}/*
quarkus.http.auth.permission.quarkus.policy=devops
quarkus.http.auth.policy.devops.roles-allowed=DEVOPS
```

When starting up the application it fails with an exception with the following root cause:
```
Caused by: java.util.NoSuchElementException: SRCFG00011: Could not expand value quarkus.http.non-application-root-path in property quarkus.http.auth.permission.quarkus.paths
	at io.smallrye.config.ExpressionConfigSourceInterceptor$1.accept(ExpressionConfigSourceInterceptor.java:68)
	at io.smallrye.config.ExpressionConfigSourceInterceptor$1.accept(ExpressionConfigSourceInterceptor.java:58)
	at io.smallrye.common.expression.ExpressionNode.emit(ExpressionNode.java:22)
	at io.smallrye.common.expression.CompositeNode.emit(CompositeNode.java:22)
	at io.smallrye.common.expression.Expression.evaluateException(Expression.java:56)
	at io.smallrye.common.expression.Expression.evaluate(Expression.java:70)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:58)
	at io.smallrye.config.ExpressionConfigSourceInterceptor.getValue(ExpressionConfigSourceInterceptor.java:38)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.FallbackConfigSourceInterceptor.getValue(FallbackConfigSourceInterceptor.java:24)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.PropertyNamesConfigSourceInterceptor.getValue(PropertyNamesConfigSourceInterceptor.java:17)
	at io.smallrye.config.SmallRyeConfigSourceInterceptorContext.proceed(SmallRyeConfigSourceInterceptorContext.java:20)
	at io.smallrye.config.SmallRyeConfig.getConfigValue(SmallRyeConfig.java:307)
	at io.quarkus.runtime.configuration.ConfigRecorder.handleConfigChange(ConfigRecorder.java:40)
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep$checkForBuildTimeConfigChange1532146938.deploy_4(Unknown Source)
	at io.quarkus.deployment.steps.ConfigGenerationBuildStep$checkForBuildTimeConfigChange1532146938.deploy(Unknown Source)
	... 52 more
```

So somehow the value in the `quarkus.http.auth.permission.quarkus.paths=${quarkus.http.non-application-root-path}/*` cannot be expanded. In all earlier versions of Quarkus this worked.

### Expected behavior

It seems like this should be allowed.

### Actual behavior

Exception thrown at startup (see issue description).

### How to Reproduce?

Reproduce:

1. Download and extract [code-with-quarkus.zip](https://github.com/quarkusio/quarkus/files/9380509/code-with-quarkus.zip)
2. Run `mvn verify` or `mvn quarkus:dev`
3. See logged exception


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

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.12.0.CR1

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

_No response_

### Additional information

_No response_

Changed files:
core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java
integration-tests/test-extension/extension/deployment/src/test/java/io/quarkus/config/BuildTimeRunTimeConfigTest.java

diff --git a/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java b/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java
index b2d5df56d5f..d338e053705 100644
--- a/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java
+++ b/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigRecorder.java
@@ -1,9 +1,11 @@
 package io.quarkus.runtime.configuration;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.microprofile.config.Config;
 import org.eclipse.microprofile.config.ConfigProvider;
 import org.eclipse.microprofile.config.ConfigValue;
 import org.eclipse.microprofile.config.spi.ConfigSource;
@@ -11,6 +13,8 @@
 
 import io.quarkus.runtime.annotations.Recorder;
 import io.quarkus.runtime.configuration.ConfigurationRuntimeConfig.BuildTimeMismatchAtRuntime;
+import io.smallrye.config.ConfigSourceInterceptorContext;
+import io.smallrye.config.ExpressionConfigSourceInterceptor;
 import io.smallrye.config.SmallRyeConfig;
 import io.smallrye.config.SmallRyeConfigBuilder;
 
@@ -26,18 +30,51 @@ public ConfigRecorder(ConfigurationRuntimeConfig configurationConfig) {
     }
 
     public void handleConfigChange(Map<String, ConfigValue> buildTimeRuntimeValues) {
+        // Create a new Config without the "BuildTime RunTime Fixed" sources to check for different values
         SmallRyeConfigBuilder configBuilder = ConfigUtils.emptyConfigBuilder();
+        // We need to disable the expression resolution, because we may be missing expressions from the "BuildTime RunTime Fixed" source
+        configBuilder.withDefaultValue(Config.PROPERTY_EXPRESSIONS_ENABLED, "false");
         for (ConfigSource configSource : ConfigProvider.getConfig().getConfigSources()) {
             if ("BuildTime RunTime Fixed".equals(configSource.getName())) {
                 continue;
             }
             configBuilder.withSources(configSource);
         }
+        // Add a new expression resolution to fall back to the current Config if we cannot expand the expression
+        configBuilder.withInterceptors(new ExpressionConfigSourceInterceptor() {
+            @Override
+            public io.smallrye.config.ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) {
+                return super.getValue(new ConfigSourceInterceptorContext() {
+                    @Override
+                    public io.smallrye.config.ConfigValue proceed(final String name) {
+                        io.smallrye.config.ConfigValue configValue = context.proceed(name);
+                        if (configValue == null) {
+                            configValue = (io.smallrye.config.ConfigValue) ConfigProvider.getConfig().getConfigValue(name);
+                            if (configValue.getValue() == null) {
+                                return null;
+                            }
+                        }
+                        return configValue;
+                    }
+
+                    @Override
+                    public Iterator<String> iterateNames() {
+                        return context.iterateNames();
+                    }
+
+                    @Override
+                    public Iterator<io.smallrye.config.ConfigValue> iterateValues() {
+                        return context.iterateValues();
+                    }
+                }, name);
+            }
+        });
         SmallRyeConfig config = configBuilder.build();
 
         List<String> mismatches = new ArrayList<>();
         for (Map.Entry<String, ConfigValue> entry : buildTimeRuntimeValues.entrySet()) {
             ConfigValue currentValue = config.getConfigValue(entry.getKey());
+            // Check for changes. Also, we only have a change if the source ordinal is higher
             if (currentValue.getValue() != null && !entry.getValue().getValue().equals(currentValue.getValue())
                     && entry.getValue().getSourceOrdinal() < currentValue.getSourceOrdinal()) {
                 mismatches.add(
diff --git a/integration-tests/test-extension/extension/deployment/src/test/java/io/quarkus/config/BuildTimeRunTimeConfigTest.java b/integration-tests/test-extension/extension/deployment/src/test/java/io/quarkus/config/BuildTimeRunTimeConfigTest.java
index 8e8f985f932..09e307bff0d 100644
--- a/integration-tests/test-extension/extension/deployment/src/test/java/io/quarkus/config/BuildTimeRunTimeConfigTest.java
+++ b/integration-tests/test-extension/extension/deployment/src/test/java/io/quarkus/config/BuildTimeRunTimeConfigTest.java
@@ -35,7 +35,9 @@ public class BuildTimeRunTimeConfigTest {
 
                     return ShrinkWrap.create(JavaArchive.class)
                             .addClasses(DevBean.class)
-                            .addAsResource(new StringAsset(props + "\\nquarkus.application.name=my-app\\n"),
+                            .addAsResource(new StringAsset(props + "\\n" +
+                                    "quarkus.application.name=my-app\\n" +
+                                    "quarkus.application.version=${quarkus.http.ssl.client-auth}"),
                                     "application.properties");
                 } catch (IOException e) {
                     throw new RuntimeException(e);
@@ -45,7 +47,7 @@ public class BuildTimeRunTimeConfigTest {
     @Test
     void buildTimeRunTimeConfig() {
         // A combination of QuarkusUnitTest and QuarkusProdModeTest tests ordering may mess with the port leaving it in
-        // 8081 and QuarkusDevModeTest does not changes to the right port.
+        // 8081 and QuarkusDevModeTest does not change to the right port.
         RestAssured.port = -1;
 
         RestAssured.when().get("/application").then()