diff --git a/src/applications/policy/filter/PhabricatorPolicyFilter.php b/src/applications/policy/filter/PhabricatorPolicyFilter.php
--- a/src/applications/policy/filter/PhabricatorPolicyFilter.php
+++ b/src/applications/policy/filter/PhabricatorPolicyFilter.php
@@ -461,7 +461,7 @@
     // checks make it difficult to create cycles normally, so just do a
     // simple check here to limit damage.
 
-    static $depth;
+    static $depth = 0;
 
     $depth++;