Fix to khan-exercises to get button text changing again on error (fixes #2030).

Plus a regression test, in case it happens again.