Fix WL-2961

Some refactoring to headscripts.js happened with WL-2961, this updates kernel to match the new method name.