It seems to me that the ray.tmin and ray.tmax are not getting updated during the bvh traversal. Is that correct? As in other ray tracing engines, I would expect tmin and tmax to correspond to the t value of the ray entering and leaving the bounding box of that object.
In that case, would it be possible to access the Aabb of the geometry within the intersection program? Without explicitly defining it as a variable to save some memory.