Raise an error when attempting to use a scalar variable as a dimension

If 'x' was a scalar variable in a dataset and you set a new variable with
'x' as a dimension, you could end up with a broken Dataset object.