Test case where newly opened windows fail to be always on top, bringToFront

I am using vaadin-6.8.9.jar running the attached web app (TestCase1-v1.war) in tomcat 7 environment with java 7.
Two java source files are also attached.
This app contains 3 panels, let’s call them first, message and busy respectively for easy of discussion.
The first panel has a ListSelect and two buttons, called doButton1 and doButton2.
When the the user clickes doButton1, the app will show two consequetive busy panel (5 sec each) and finally redisplay the first panel by removing it and adding it again to the vaadin main window (with list updated a bit).
When the the user clickes doButton2, the app will show message panel first. When the user clicks OK button, the app will show busy panel for 5 sec and then redisplay the first panel.
I use setPosition methods to offset positions of each panel so even a panel is under another, it is still visible in the browser window.
When the app is first launched (http://localhost:8080/TestCase1-v1), the first panel shows up. The first button click (either doButton1 or doButton2) works as expected. However, from second button click, use doButton2 as example, the message panel will show up but under the main panel. (In my real application, this has the effect of message panel not showing up as it is completely covered by the first panel.) When I manually drag the message panel out so I can click on OK button, the rest panels (busy and first) were displayed correctly. Similar thing happens if doButton1 is clicked, i.e. first busy panel will be under the first panel, but 2nd busy panel is on top of the first panel as expected.
I have used Window class’ bringToFront() and focus() method after addWindow() call to the main window. But they didn’t help. All I do is to add/remove window from main window and then let the thread go back to vaadin. However, somehow vaadin treats the first button click after init differently from successive button clicks. What did I miss?
Any advice on what the problem might be? What can I do to debug this?
Appreciate the help!
35106.java (7.46 KB)
35107.java (3.46 KB)
35108.war (4.46 MB)