Consolidate tmpid gen.