Perhaps move this repeated code to a method: something like "CreateIIDFromName" (if that is what it is doing)?