Detect directory hard links as early as possible