autowrap: correct order of arguments, fix #2971

Someone needs to have a look at this, as I am not sure what this 'm' is
all about.