document.getElementById() may return incorrect element in IE and Opera

I came across a bug in Internet Explorer whereby the document.getElementById() function may return an element with a name attribute equal to the id that...