Prohibit assignment to `&mut` pointers that are found in frozen or borrowed locations.

Fixes #8625.