Autowrap: use routine helper instead of calling Routine directly

This leads to annoying variable clashes so I renamed them to "the_routine".