It essentially did detect a contradiction, and "resolved" it by trying to square its initial (wrong) response with the reasoning afterwards (which contained the correct response). Perhaps if it would've been able to delete the initial paragraph of its own response it might have.