Revert "[Panel Containment] Replace restore order logic by "algorithms""
The patch was merely for cosmetics and utterly broke JS panel setup.
This reverts commit efd188db583821f092acbfb60ced1fe528bf306c.