Sticky element causes page to jump due to late setting of height on wrapper

I've been having an issue where scrolling down a small page with a large sticky nav causes the page to jump. The cause of this is due to the 'stuck' class, which has position:fixed, being applied before setting the height of the wrapper element.

I've created a jsfiddle example that contains an iframe with some exaggerated proportions to see this issue: http://jsfiddle.net/Ze3Zb/

Clicking and dragging the scroll bar down is almost impossible. This is more obvious in Chrome, however it does occur at times in Firefox too.