Update symbol references when removing a symbol (#4656)