Came across this one after adding some spam filtering header checks as a message rule. Example below.
The issue is that, even though the option to run the filter 'getting new mail' is on, this isn't it seems what actually happens. For example. 3 messages in junk folder, but are not actually junk. That's fine. Drag then into the inbox. They move, but immediately move back into the junk folder. Right-click them and mark as not junk. They move back into the inbox, then immediately move back into the junk folder 😉
So, it's not really when 'getting new messages', it seems, but when adding to a folder the check is run. I thought there might be an additional rule I could add so that 'if marked as not junk' do not process, but I cannot see any way to access that mark via the filter rules.