Make sure fragment caching is only happening on nodes in the main document. Fixes #5978.
Make sure fragment caching is only happening on nodes in the main document. Fixes #5978.

dtjm/jquery,npmcomponent/component-jquery,quiaro/request-agent,praveen9102/Shazam,hoorayimhelping/jquery,Karyotyper/jquery,kpozin/jquery-nodom,dtjm/jquery,fat/jquery,jquery/jquery,jcutrell/jquery,demetr84/Jquery,Karyotyper/jquery,RubyLouvre/jquery,ilyakharlamov/jquery-xul,roytoo/jquery,fat/jquery,sancao2/jquery,RubyLouvre/jquery,jquery/jquery,npmcomponent/component-jquery,diracdeltas/jquery,chitranshi/jquery,gnarf/jquery,jcutrell/jquery,sancao2/jquery,eburgos/jquery,hoorayimhelping/jquery,praveen9102/Shazam,scottjehl/jquery,gnarf/jquery,chitranshi/jquery,roytoo/jquery,roytoo/jquery,eburgos/jquery,diracdeltas/jquery,eburgos/jquery,isaacs/jquery,sancao2/jquery,Karyotyper/jquery,rwaldron/jquery,scottjehl/jquery,mislav/jquery,ilyakharlamov/jquery-xul,diracdeltas/jquery,mislav/jquery,kpozin/jquery-nodom,rwaldron/jquery,isaacs/jquery,jquery/jquery,demetr84/Jquery