Add stackless kd-tree traversal wrapper for testing.