fix runtime crash in UnitPieceLight reported by smoth