Replace SVal llvm::cast support to be well-defined.

See r175462 for another example/more details.