Merged r4456:4483 from jcorgan/ticket-138 into trunk. Fixes ticket:138.