Added guard for 'view' context-variable in layout.html view.