ast: Correct reported dimensionality in an error report