BSERVER-10341 Fix the removeHiddenPanels to allow overwrite to work co...

...rrectly