The symbol record substream needs to be written at a multiple of 4 bytes. This is because the next field that is read is the beginning of the module debug subsections (checksums, lines, etc) and the first field is a uint32.
I found this by round-tripping empty.pdb from the test folder and seeing it give me an error. To determine the correct fix, I stepped through the reading code of empty.pdb and saw that the Symbol Record Substream consisted of 208 bytes, a multiple of 4. This is the value that the header reported for the "symbol record substream size", as well as the number of subsequent bytes we read and attributed to the symbol record substream. When I converted this file to yaml, and then converted it back to pdb, we were writing 206 bytes for this value, and then writing 206 bytes of data.