Fixed a stack overflow while redrawing.
Authored by: michaz 2010-07-27
Parent: [r12186]
Child: [r12188]