fix resolve_dependencies, copy unprocessed because loop body may append to it