I think the screenLayoutChange() function was one of the changes made to support the tablet.  I don't fully understand it, and am very concerned that your code is only executed when evt.detail.name is 'portrait'.  Does this also get called with the name 'landscape'?  Is this really happening on any orientation change, or just portrait mode.

John Hu might be able to explain here.  Or, consider registering your own resize() handler just for the purpose of calling setOffsetPosition.  (But be careful with resize handlers: they seem to get called with size 0,0 sometimes.)