Well, I’m not sure if it will help you or not, but personally I believe that it’s better not to include JS in the ajax responses. Just return only plain HTML or json as an ajax response … it means that you have to send all the JS code in the initial loading of the page. You may not like this idea, but it will enable you to manage your code much easier.
You should be able to write your ajax function for user comments without including JS in the response.
Pragmatically speaking, you’d better not put CHtml::ajaxSomething in the area which will be updated by ajax. In other words, do not use them in a CGridView row or in a CListView partial view. Instead, you can write a JS code manually to handle the event using jQuery.on() outside the CGridView or CListView.