code: AbstractConfigValue resolveCheckingReplacement(ResolveContext context,
              AbstractConfigValue original) throws NotPossibleToResolve {
          AbstractConfigValue replacement;
  
          replacement = replacement(context, original);
  
          if (replacement != original) {
              // start over, checking if replacement was memoized
              return context.resolve(replacement);
          } else {
              AbstractConfigValue resolved;
  
              resolved = original.resolveSubstitutions(context);
  
              return resolved;
          }
      }
docs: Conceptually, this is key.value().resolveSubstitutions() but using the
  replacement for key.value() if any.