The optimize parameter of Window, which defaults to true, is messing up the scrollbar size when the content is a Wrapper. The scrollbar is being sized to the wrapper but the wrapper has its contents removed by the optimize. So check on timing of the scrollbar calculation - it needs to come before the optimize removal.
Until this is fixed - set the optimize:false on the Window.