Although not using multithreading, the thread parameter in the BVHTree_OverlapCallback callback always returned a value between the "number of threads".
This can get in the way, as this parameter should always be 0 in such cases.
Also a BLI_Stack was created for each "thread" and used.
This is a small overhead that can be avoided.
This patch fixes these cases.