Fix bug in index selection with LIKE.