Fix SQLMergeClause keys handling

Fixes #940