Fixed issue with SetValue

While still keeping the virtual call that will be called if no case
matches I've modified SetValue to avoid for the issue where any set
resulted in an exception thrown as the base call was always hit.