Bug #2851: Various bug fixes in the radix-sort memory allocation part and the BVH traversal kernel that only appeared when processing a large dataset