Fixes a dangling reference to a released view controller.