fix #5044

delete "const x" nodes when deleting variable "x", instead of
transforming them.