Fix to bug 497: make ITE cache context-dependent.
better arith error in case of nonlinear while in linear logic