Don't delete nodes when they are discarded. Fixes #237.