Dependencies of jQuery and Underscore have been removed

I have removed dependencies of jQuery and Underscore. But I have faced with a problem: Now our code defines own jQuery and Underscore. Even though I save existing version of jQuery in my extra variable, then run script and retriev all to back - it breaks all event on page which were defined earler.