Fix IE9 issue with shadow tree composition

msMatchesSelector does not work on elements that are not in the document
Merge pull request #362 from arv/fix-ie-9-matches

Fix IE9 issue with shadow tree composition