Merged all missing bug fixes from current_stable.
Authored by: knut_f 2009-01-29
Parent: [r1032]
Child: [r1034]