encoding: Fix bug in encodeTlvData and decodeTlvData: Need to use correct value for Data type.