Fix incorrect creation of discrete vars in unit tests.
Changed Value.value to a property returning the native value.