Added config setting to limit depth of kd-tree.