Removes duplicate loops over deps in priority update