Fix to bug 497: make ITE cache context-dependent.