Abstract the common code into a generate_unique_name("__Prefix", Line) call?