Forgot a dependency
Add some defensive checks to context.c