The root cause is RestoreAuiLayout() that restore the previous Aui perspective
can be called only when all panes are created, because (at least on Windows)
when items managed by m_auimgr are not the same as those existing when saved
by Perspective() in config, broken settings (visibility, position) can happen.
Partial fix for #21828