Fix invalid call context in IE

The element collection is invalidated once it is added to the div item, so
make the call to getElementsByTag *after* the content is added to the div.

Signed-off-by: jketreno <james.p.ketrenos@intel.com>