BaseTools: dont use enumerate when un-needed