Merged r6271:6278 from jcorgan/t182 into trunk. Implements ticket:182.