workspace: Force creating new layout when there's no allocation yet
Commit ba23279f was aimed at fixing a bug where the layout is frozen so early that we don't have an existing one to re-use, because no allocation cycle happened yet. It tried to fix that by forcing the creation of a layout when needsLayout === true, this turned out to be a bit too much, as it also forced creating a new layout when the layout was frozen after closing a window (which would set needsLayout to true).
To fix this regression and still avoid reintroducing the bug the previous commit fixed, tighten the check a bit and only force creating the new layout when there's no allocation yet. This makes freezing the layout after closing a window work again.
Fixes #5198 (closed)