Adjusted queryselector to operate on the SR

I assume that querying from document into a Shadow Root isn't expected
to work. Made the query to operate on the SR which fixes the failing
test(s).