I have fixed this issue in our moodle install so thought I'd post it here.
getting error 'Could not recode answer in question_match_sub' in file question/type/match/questiontype.php method restore_recode_answer. The issue is that the $match_answer_id that's being used actually refers to the 'code' field in the 'question_match_sub' table. I added a line to get the correct id using the code value and assigned it to match_answer_id.
There were also some other non fatal errors that I fixed. Just related to the variable $match_ans not being instantiated when called.
I also found in the backup method of the match questiontype that the details of the 'question_match' table aren't written to the backup file at all. Instead
details from 'question_match_sub' are added as 'MATCH' items when in fact they should be 'MATCH_SUB'.
If we just corrected the name we'd break from the standard moodle backup api that has this bug in it. So for now I just added the details in the element
'MATCH_DEFINITIONS' for want of a better name.
The bug is important because it may make a backup fail if it includes a match questiontype