Remove unneeded variable dependencies *before* removing unused variables to catch more dead code.