Add missing va_end() calls to finish vararg access