Ray tracing geometries with same position, translation and scale
This is more of a comment then an answer:
I have resolved this problem in a ray tracer using Constructive Solid Geometry(CSG). Which was done by adding operators that allowed us to create objects that are the union, difference, and intersection of a combination of objects. Here is a wiki page on the subject.
CSG sounds difficult to implement, but it is actually surprisingly straight forward.
But, this system was added for other reasons, it just turned out that we could &quot;subtract&quot; the light from the box (using your post as an example), then the intersection for the light itself falls out naturally since it can no longer hit the box where the two intersect.
This really is just reiterating what everyone has been saying in the comments, every solution is either done by creating real geometry that avoids the problem (like CSG) or use some sort of hack. I posted the CSG answer because it resolves the problem so naturally if it is available.