The issue was that the const evaluator was returning an error because the feature flag const_indexing wasn't turned on. The error was then reported as a bug. Fixes #29914