Backported Fix for #5637 (r7386) to trunk.
Authored by: jonas 2008-07-24
Parent: [r7386]
Child: [r7388]