ALGO: fix bug when a pointer is between multiple quads

We have to set a priority, otherwise a point might belong to
multiple quads (max 4 if it's in the very middle).