Capping depth of kd-tree for improved perf