Recover mut $pat
and other improvements
#63945
Merged
mut $pat
and other improvements
#63945