I have had this problem before… My guess is that you have layers in your composition that don’t extend all the way thru from beginning to end of the composition length.(though precomposed comps nested in the composition don’t seem to cause the problem, just the direct layers) I finally figured out that was what was causing the glitch in Optical Flares. Copilot said that it was something to do with the code under the hood that drives the plugin and supposedly sent it to the developer but have not seen a subsequent fix or patch… so If you extend your layers to stretch from start to end of the composition of nest the problem comp into a new one and use the Optical Flares on that will usually fix the problem..
Besides this glitch Optical Flares is a great plugin, really wish they could/would fix it…