Return same c_DOMElement object when calling getElementById multiple times

Should fix #2109