Another tweak for bug #7906.  This simplifies the code some.