diff --git a/app/Entities/Tools/PageContent.php b/app/Entities/Tools/PageContent.php
index a12a19c66..949816eff 100644
--- a/app/Entities/Tools/PageContent.php
+++ b/app/Entities/Tools/PageContent.php
@@ -304,7 +304,7 @@ class PageContent
         if ($blankIncludes) {
             $content = $this->blankPageIncludes($content);
         } else {
-            for ($includeDepth = 0; $includeDepth <= 3; $includeDepth++) {
+            for ($includeDepth = 0; $includeDepth < 3; $includeDepth++) {
                 $content = $this->parsePageIncludes($content);
             }
         }
diff --git a/tests/Entity/PageContentTest.php b/tests/Entity/PageContentTest.php
index cf67e27e2..d8845fe12 100644
--- a/tests/Entity/PageContentTest.php
+++ b/tests/Entity/PageContentTest.php
@@ -116,7 +116,8 @@ class PageContentTest extends TestCase
         $page->save();
 
         $pageResp = $this->asEditor()->get($page->getUrl());
-        $this->withHtml($pageResp)->assertElementContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry ' . $tag);
+        $this->withHtml($pageResp)->assertElementContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry Hello Barry ' . $tag);
+        $this->withHtml($pageResp)->assertElementNotContains('#bkmrk-test', 'Hello Barry Hello Barry Hello Barry Hello Barry Hello Barry ' . $tag);
     }
 
     public function test_page_content_scripts_removed_by_default()