Teck’s exit from oil sands hits potential legal snag