This fixes an initial-state issue when using for example an ActionToolBar, which would cause all the children of the layout to be visible initially, resulting in an terribly odd looking layout.
An example, without this patch:
The same location, with this patch: