(#20997) Don't try to invoke a constant as a method

While methods on constants can be invoked with the scope resolution
operator, EG `SemVer::valid?`, the reverse isn't true for retrieving
constants. This commit correctly retrieves the SemVer::MIN constant.