Further improvements to docking/nesting panel behaviour

Adding two panels in one direction and two in the opposite direction then
removing them one at a time now works properly. (see new integration test)