Add lock aquisition/release to unguarded id generation counters