If you run the following example, Mojarra will fail to display an alert during an Ajax request:
<h:commandButton value="Click Me">
<f:ajax render="group1" />
alert('Script is called');
The resource gets relocated during the Ajax request, but it never gets rendered.
It seems that JSF assumes that resources are always rendered during a full-page request. In reality, we need to deal with resources being added during subsequent Ajax requests, and that should involve being able to distinguish between the resources that already have been sent to the client and the resources that need to be included with the Ajax response. Ideally, this information should be available to legacy (pre-JSF Ajax) implementations as well (as opposed to making it all internal to the JSF Ajax implementation).