There are times where Nuke cache get corrupted occasionally with varying result such as duplicate frames, corrupted render or simply reading from the cache instead of processing the new settings in your script.
So one of the quickest way to fix it is to clear the cache. Well clear all the cache.
I do browse the Nuke forum at The Foundry and CGTalk whenever I face any issues regarding Nuke before hitting up their support team. Seems like this issue rarely pop up but at least clearing caches has been a huge timesaver in troubleshooting problematic frame where I’m at lost when hunting down the culprit.