Refs #16723 - Remove endless loop while generating random_id