Workaround bugs exposed by test_context changes