Handle zero threads better. Refs #659.