Query the document for the template, not the head.
Query the document for the template, not the head.

There is inconsistency in behavior of where templates end up
in compiled vs uncompiled code. So, query the document instead.

git-svn-id: 3a56fcae908c7e16d23cb53443ea4795ac387cf2@1431 0e6d7f2b-9903-5b78-7403-59d27f066143

bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer