Add upper bound for depth

This depth (9) matches the minimal depth for ID (9-1=8)
in the called search().