Removes a redundant variable reference