Fix (irrelevant) error in test, and strengthen it to ensure the right failure is being caught.