The code has changed slightly since that version. The solution is now to add the following line before the end of the branch:
if (isset($question)) { ... }
at the end of qa_page_q_load_q() in qa-page-question.php:
$question['answerbutton']=$question['answerbutton'] && !isset($question['selchildid']);
The && is a logical AND so we're just adding another condition here on whether a question can be answered - the condition is that it has no selected answer.