Exam board apologises for testing students on topics ruled out of exams