Fix const with newdecls and a varargs bug. (bug 6179)