Ensures the size of the heading is taken into account properly. BUG: 443805 (cherry picked from commit c0f7505c)