Merged r6324 and r6325 from trunk (#8651).
Authored by: jplang 2011-11-11
Parent: [r7765]
Child: [r7767]