This is a proper fix for bug 2149926.
It uses pretty much the same code as for removing a pane but also puts it back in again at (hopefully, haven't tested it with that many combinations) the same position. This makes sure that no pane has the hidden pane as parent.
View and moderate all "patches Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Patches"
Thanks a bunch for this Agiel.