Compensation for sidewise deviation of machined workpiece