Fixing Collection::merge() to work with nested structures