Fixed Bug with GetLightDirection at End of Tube

Now checks if the iterator is beyond the end of the tube segment list,
before trying to compute the light direction.