Better dce

See commit messages for the details.