Add an error when reducing a zero-sized dimension with no identity