Bug 1007743 - Update flattened tree to correctly handle nodes distributed into Shadow DOM insertion points. r=smaug