Detect exercise regardless of case. Fixes #1127.