Here's the offending code. To test it, save it in a file called "test.html" and click the button in the top-left corner.
If I open the page in normal IE7 window, it works fine.
However, if I open it in an IE7 modal dialog, it draws the vertical scrollbar on top of the margin. What's even worse, because it draws the scrollbar on top of the margin, it also causes a horizontal scrollbar to be drawn.
How do I work around this? I absolutely must use the IE modal dialog, I'm not at liberty to change that.