Fixed a bug where a fetch global ids array was not being assigned to a variable.
Added tests for concurrent inserts, and interrupted merges, to reproduce issues encountered by Steve Tibbett. Tests now passing.