Correct the content size computed in Layout class