Fix a bug where TypeParameterMatcher raises ClassCastException when an instance with raw type parameter is given