The behavior of the above function has changed. Before, the box wrapped snugly around its content, but now it seems to stretch out as far as possible. The Lesson module now looks pretty bad and I saw other areas that are affected as well.
There is a interesting report that takes this extra width into consideration found in
MDL-4569. I tested the code and I had mixed results, so it still needs work.