Fix Issue 5908 - Optimizer generates wrong value with divide-by-zero.

Reinstate optimizer error for integer division by zero