re-merge -r12613, also seemed to fix a default outside of switch error that appeared to come from trunk
Authored by: safemode 2010-02-27
Parent: [r12648]
Child: [r12650]