Fix a use-after-free of `full_name`.

Also add some guards against future dangling pointer bugs.

r? @larsbergstrom