Autodim bugfix (thanks Phil!)

Phil DeGruy noticed that the autodimming didn't work under certain
circumstances.  It seems I introduced this bug when rewriting code to
support alternative ways to drive the IV-18.  Oops!

This bug has been fixed.