Merged r7866:7887 from michaelld/discheck_fix into trunk. Allows running 'make distc...