Fixed a crash

The problem with switching models with lighting enabled is resolved.
Slightly different than I suspected, but related. Just needed to stop
processing the arrays while changing models.