App: be more thorough when checking surface-associated LayoutState