Ported r4471 and r4478 to 0.10-stable (fixes #2669)
Authored by: mgood 2006-12-20
Parent: [r4478]
Child: [r4480]