Backport Handle the parameters of a tail-rec LabelDef in a more principled way.

In particular, we do not patch them as mutable by default, only to
re-patch them as immutable if they are not mutated. Instead, we keep
their original isMutable flag as the default, and we patch immutable
locals as mutable if they are mutated.

(cherry picked from commit 8886e2d45fbc494c0d06c131ba389777a2becc62)