Fixed issue #2397891 (drupal.org), and made jshint a little happier