Where is the content cache when using apply_filters(‘the_content…?
I’m unable to replicate the problem you’re describing. I’m guessing it has to do with one of two things: An issue with $sections – how exactly is this populated? or A hook to ‘the_content’ somewhere else in your code – perhaps a filter function you wrote has a bug in it causing the duplicate content?