I just ran some hands through the odds calculator with the idea of seeing what kind of draw it takes for middle set to become favorite over top set. The answer is: It takes as much draw as you can get. I assumed top set was completely dry with no redraw at all and no blockers for the outs on middle set.
Here's what I get:
1) Top set vs. middle set with flush draw only (KK73 vs. JJA6 on a board of KJ2 where JJ has nut flush redraw): 63% equity for top set or 1.7:1 (so middle set still has to call).
2) Top set vs. middle set with flush draw and gutshot (same board but I changed the 6 to a Q for JJ): Now KK only has 55% equity, but is still ahead.
3) Naked top set vs. middle set with open-ender AND flush draw (same board but now I used JJQT with flush and straight draw): Now middle set is slightly ahead at 52%.