[build] fix rules generation when first token was multiple and a selected group