Simplify `getMethodAssignments`, add `removeMethodAssignments`, and avoid some cleanup when the `--no-dep` flag is passed in build.js.