Fix for issue 594.
Fix for issue 594.

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