Fix to Chris's patch in r6106 (also from Chris).