Fix handling of partial init attributes in write_verilog, fixes #997