fix regressions in QuadTree and add some debug options

The `QuadTree` entry in `nodes` can be null....