This was very simple to reproduce, just turn on Freestyle and press render. Now to the truth of things. Most (if not all) of ~BlenderStrokeRenderer() can be removed. I believe this was done back when freestyle was using G.main, and since we gave freestyle its own main we can just leave the cleanup for later. I will leave this for freestyle maintainers to think over though. Note: There is a chance this was the issue reported on T57890. I will wait for the reporter to confirm this as fixed though.