BUG 9933 another improvement evaluating conditions with grid values