Fixes light going through walls

Fixes #2788