The United States Army Corps of Engineers built a new route through the Salish Mountains , including the 7-mile-long Flathead Tunnel , second-longest in the United States , to relocate the tracks away from the Kootenai River .