Adding JavaScript before drupal.js
In the end I got it working by changing the code to:

  drupal_add_js('misc/jquery.js', array(
    'group' =&gt; JS_LIBRARY,
    'weight' =&gt; -20,
    'every_page' =&gt; TRUE,
    'cache' =&gt; TRUE,
    'scope' =&gt; 'header',
  ));
  drupal_add_js('misc/jquery.once.js', array(
    'group' =&gt; JS_LIBRARY,
    'weight' =&gt; -19,
    'every_page' =&gt; TRUE,
    'cache' =&gt; TRUE,
    'scope' =&gt; 'header',
  ));


This then meet the rules on https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_add_js/7


First by scope, with 'header' first, 'footer' last, and any other scopes provided by a cust om theme coming in between, as determined by the theme.
Then by group.
Then by the 'every_page' flag, with TRUE coming before FALSE.
Then by weight.
Then by the order in which the JavaScript was added. For example, all else being the same, JavaScript added by a call to drupal_add_js() that happened later in the page request gets added to the page after one for which drupal_add_js() happened earlier in the page request.