Another fix for the 'mode' variable being located in the class namespace.
Authored by: bugman 2010-02-23
Parent: [r10843]
Child: [r10845]