Judge halts rail project close to Earth’s most threatened tribe