Re-add check for enclosing pagination layer.

I was too optimistic in CL:3695334, and added a DCHECK. Change it back
to "if". In the legacy engine, a column spanner doesn't have an
enclosing pagination layer, even if its multicol container is nested
inside another multicol.

Bug: 1334885
Change-Id: Iae7adfe5e7bd5f91848407bf4570338080950222
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3695240
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Auto-Submit: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1012564}
diff --git a/css/css-multicol/crashtests/scrollable-spanner-in-nested.html b/css/css-multicol/crashtests/scrollable-spanner-in-nested.html
new file mode 100644
index 0000000..b904aad
--- /dev/null
+++ b/css/css-multicol/crashtests/scrollable-spanner-in-nested.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1334885">
+<div style="columns:2;">
+  <!-- Add a table, as an attempt to trigger legacy layout fallback. -->
+  <div style="display:table;"></div>
+  <div style="columns:2;">
+    <div style="overflow:scroll; column-span:all;"></div>
+  </div>
+</div>