If we're removing a predecessor because it already exists during replacement, we should also drop pi nodes for that predecessor. Fixes oss-fuzz #39276.