Fixes #2052 (Discrete Mapping values set to wrong attribute)