Fix issues with margin collapse

According to the CSS specification, section 8.3.1, margins of the root
element's box do not collapse. Ensure that root flow margins do not
collapse during the assign heights phase.