Makes sure that the debug error message display survives DOM modifications.
Reduces the size of JavaScript emitted by HtmlWriter#writeAllGridJavaScript and changes it to not fire if the layout areas are already in the right order.
Improves grid debug display.