Added an assertion check to prevent array out of bounds access to the extended lightsectors code