 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 (presence IN ('absent', 'excluded')
+        OR depth NOT IN ('infinity', '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 presence IN ('normal', 'incomplete', 'base-deleted')
   AND file_external IS NULL
 LIMIT 1
 

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

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