Make a few functions of it const so this works.
(A few of the serialization functions might not depend on the constification of ScriptInterface, but splitting them wouldn't make a lot of sense.)
Adding @echotangoecho to the loop since D492 touches some of the same filse.