MDEV-465: Optimizer : wrong index choice: Add a testcase.