diff --git a/src/libknot/zone/zone-tree.c b/src/libknot/zone/zone-tree.c
index a7e3d9f288f3d912ad96d73144d2a632ae2b8728..1f8cb1624aa4de155e5eb101880a620562c1e3ca 100644
--- a/src/libknot/zone/zone-tree.c
+++ b/src/libknot/zone/zone-tree.c
@@ -194,7 +194,9 @@ int knot_zone_tree_get_less_or_equal(knot_zone_tree_t *tree,
 		*found = NULL;
 	} else if (ret > 0) {
 		/* node is before first node in the trie */
-		assert(0);
+		*previous = knot_node_get_previous(*found);
+		/* left of leftmost node is the rightmost node */
+		*found = NULL;
 	}
 
 	/* Check if previous node is not an empty non-terminal. */