Maybe try EXEC instead of USE so the arrays get initialized? Ideally that should run the variable initializations and then skip over the function definitions, then return to the previous slot.