Prohibit assiginments to `&mut` pointers in borrowed locations

Fix for #8625.