kernel: use C++11 fold hack to prevent recursion
kernel: use C++11 fold hack to prevent recursion

SymbiFlow/yosys,SymbiFlow/yosys,antmicro/yosys,antmicro/yosys,SymbiFlow/yosys,cliffordwolf/yosys,YosysHQ/yosys,cliffordwolf/yosys,antmicro/yosys,antmicro/yosys,cliffordwolf/yosys,cliffordwolf/yosys,cliffordwolf/yosys,SymbiFlow/yosys,antmicro/yosys,SymbiFlow/yosys,YosysHQ/yosys,YosysHQ/yosys,SymbiFlow/yosys,cliffordwolf/yosys,cliffordwolf/yosys,cliffordwolf/yosys,antmicro/yosys,YosysHQ/yosys,YosysHQ/yosys,YosysHQ/yosys,antmicro/yosys,SymbiFlow/yosys,cliffordwolf/yosys,SymbiFlow/yosys,YosysHQ/yosys,antmicro/yosys,YosysHQ/yosys