Not really, if I understand what this code below does:
while (taxonomy_vocabulary_machine_name_load($machine_name)) {
    $machine_name = substr($machine_name, 0, 32 - strlen($i)) . $i;
    ++$i;
}