Thanks for the code snippet!
While I was able to reproduce the memory violation in 1.9.0, I wasn’t able to see it in the nightly binary as well as a pretty new source build, so I guess it might have been a known issue, which was aready fixed. Could you install the nightly and verify it, please?