In older versions of Prototype, at least, Element.replace() handles HTML elements using their outerHtml property. This causes problems on Internet Explorer, because the outerHtml property is read-only for some elements:
The property is read/write for all objects except the following, for which it is read-only:
CAPTION,COL,COLGROUP,FRAMESET,HTML,TBODY,TD,TFOOT,TH,THEAD,TR.
This issue seems to have been fixed already several months ago with a workaround.