Fix problem when using MERGE and indexes exist
Merge pull request #1465 from systay/merge-with-index

Fix problem when using MERGE and indexes exist