The behavior here isn't really ideal, but we can't really do much better given the current state of constant evaluation. Fixes #28670, and probably a bunch of duplicates.