     AND (?2 = '' OR local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
     AND local_relpath NOT IN (
       SELECT local_relpath FROM actual_node WHERE wc_id = ?1)
-    AND (presence = 'normal' OR presence = 'incomplete')
+    AND presence IN ('normal', 'incomplete')
 /* ###  Need index?
 CREATE UNIQUE INDEX temp__node_props_cache_unique
   ON temp__node_props_cache (local_relpath) */

SELECT local_relpath, presence, depth FROM nodes
WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
  AND op_depth = 0
  AND (presence = 'absent' OR presence = 'excluded' OR
       (depth != 'infinity' AND depth != 'unknown'))
  AND file_external IS NULL

-- STMT_SUBTREE_HAS_TREE_MODIFICATIONS
SELECT 1 FROM nodes
WHERE wc_id = ?1 AND (local_relpath = ?2 OR local_relpath LIKE ?3 ESCAPE '#')
  AND op_depth > 0
  AND (presence = 'normal' OR presence = 'incomplete' OR
       presence = 'base-deleted')
  AND file_external IS NULL
LIMIT 1


  SELECT A.local_relpath, N.kind, A.properties
  FROM actual_node AS A JOIN nodes_current AS N
    ON A.wc_id = N.wc_id AND A.local_relpath = N.local_relpath
       AND N.presence IN ('normal', 'incomplete')
  WHERE A.wc_id = ?1
    AND (?2 = '' OR A.local_relpath = ?2 OR A.local_relpath LIKE ?3 ESCAPE '#')
    AND A.local_relpath NOT IN
