Variable#sum should only sum scalar values.