Fixed issue #2047 about collating on composite indexes