Fix SQLMergeClause keys handling

Fixes #940 
Good point. I fixed it now to use the configuration directly.