Revert "Move light check into loop"

This reverts commit a70f54b53d7fbcd77a8ad5ccca00c4e203b780bb.