fixes #6857 improve two-pane load times

when using two-panes, the layout is dropped and never used, we can skip generating it on the server side and improve page load time.