Prevent generating invalid unit of measure annotations