Fixed the lights part. Lifted capture/restore code from Scene-1.2. Works great now. It essentially captures the previous lights state completely, then just restores it to whatever it was. Which is what it should have done in the first place.
Repetition bug fixed. Next release for all three of these.