Optimize group sid creation.