`remains[dep.name]` here always returns `true`.