getting keys from local and remote nodes for merging.

Hello, I found an issue when two nodes splits and each of ones added a key to a table. 

In your code you get keys just from a local node. I suppose it's not fair as soon as a remote nodes can add keys in the tables too. 
As a result when I try to add key_1 to table_1 at a first node and add key_2 to table_1at a second one I'll lost one of the record depends on which node will be merge.

So that I make a patch for fix it. Please, check it out.

With BR, Ilya.