Bug fix for first display of large popups.

If the dimensions of a popup changed after rendering, it would sometimes
cause the popup to appear in the wrong place. This is now fixed.