Stop the expansion of decision trees for slice patterns as soon as possible

Fixes #17877.
auto merge of #17944 : jakub-/rust/issue-17877, r=alexcrichton

Fixes #17877.