Teck’s oil sands exit faces legal challenge