Ignore case when counting duplicated getElementsByTagName()

Resolves #419