Use Enumerable#group_by instead of rolling our own deep merge