Infinite loop bug seems fixed. Kd-tree intersection test performance changed from aweful to awesome! Surfaces pretty smooth without mirroring bug. Sometimes there seem to be faces missing in leaf nodes, though. Calculated colors seem wrong (some places are too dark, are the normals wrong?).