drupal_add_js('something.js', array('scope' => 'footer')) (or the library definition equivalent) is listed in
Result: only the JS files that are in the
'header' scope are listed in
diff --git a/core/includes/common.inc b/core/includes/common.inc
index 10b09d6..70c0b81 100644
// used, information not otherwise available when aggregation is enabled.
- $setting['ajaxPageState']['js'] = array_fill_keys(array_keys($items), 1);
// Provide the page with information about the individual CSS files used,
This is analogous to how the CSS page state is stored.
$items only contains the items for the current scope; and since settings on most pages are added when
$scope == 'header', that explains why only JS files that are in the
'header' scope get added to the page state.
Get proper test coverage. In my initial testing it turned out to be impossible to reproduce the same problem in the tests, likely because
User interface changes