Fix problems with merging vim.Dictionary

Also add tests

Fixes #516
Merge remote-tracking branch 'zyx/fix-516' into develop