I guess 
```
+  if ('' === $this->idPrefix) {
+      $sql2.= ' AND ISCHILDNODE('.$dm->quote($this->idPrefix).')';
+  }
```
Should be a !== ?