Fix a bug with Frame.merge size calculations

This change fixes a bug with nested frames, where the size of a parent is calculated incorrectly and set to the width/height of the largest child, not to the total sum of widths.