diff --git a/src/util/result.ts b/src/util/result.ts
index 8b3c60b249ead501f546cfc9419507f872f1824d..c84150b38794d1cdc70acfb0cacd6219870bccf8 100644
--- a/src/util/result.ts
+++ b/src/util/result.ts
@@ -289,7 +289,7 @@ export class Result extends JalhydObject {
         }
 
         if (recurs && this._sourceNub !== undefined) {
-            for (const n of this._sourceNub.getChildren()) {
+            for (const n of this._sourceNub.allChildNubIterator()) {
                 if (n.result.hasMessage(code, true)) {
                     return true;
                 }