it’s just a guess, but I would think that the structure in the TUNNEL lua needs to match the order in the byte stream. If so, you need to consider MAVLink’s reordering, which in this case brings the int to the front. That is, the order in the .xml file is NOT the order on the byte stream.
see Packet Serialization | MAVLink Guide