Fixed exception bug with array and set merging (always threw exception, even on success). added test for set merging.