A minor optimization to the partial-dir code.