Apparently the shader math is not precise enough to ensure that two supposedly orthogonal vectors are truly orthogonal, resulting in a non-zero dot product
(cherry picked from commit cce6c9a085)
There are situations where lights on the wrong side of a linedef may be passed and those need to be skipped in the shader code.
(cherry picked from commit 3dc6ddbcc3)