The error is thrown by a call to div.getElementsByClassName("e") in sizzle.js.
HTMLElement.prototype.getElementsByClassName is overwritten by prototype.js and it uses $ which is overwritten by jQuery. The result is that jQuery can't finish initializing and prototype is also left broken.
window.$ and window.jQuery is exposed at the end of core.js before the feature detection code in sizzle.js.
// Expose jQuery to the global object
return (window.jQuery = window.$ = jQuery);
My fix to the problem is simple: just move the exposure code to the end of outro.js and call jQuery.noConflict(true) right after the jQuery code. Then both prototype and jQuery will be fine.
I know why the exposure is advanced to core.js but maybe there is a better way to avoid the conflict. e.g. Put sizzle.js code to the beginning because it doesn't rely on jQuery anyway.
It isn't the latest version of prototype.js. However, ironically it's the version used by their official web site.
Much effort has been made to make jQuery robust and unobtrusive since version 1.2. That's why I choose jQuery for my bookmarklet which may run in any hostile page. There are many web sites out there still using very old versions of prototype.js and perhaps other js files that are not good neighbors.
Of course, no library is guaranteed to work with broken native objects. But I think such conflicts can be reduced by following the design principal that one should interfere with the global scope as little as possible and as late as possible.