Improved package ordering during removal

Results in fewer invalid "failed" messages when removing multiple packages.