Removes a variable reference that is no longer needed