improve dead code elimination in CorePrep (fixes #7796)