You failure is, that you should walk only visible windows... read the blog again.
For each visible window, walk up its owner chain until you find the root owner. Then walk back down the visible last active popup chain until you find a visible window. If you're back to where you're started, then put the window in the Alt+↹Tab list.
Your code walks over every window!