Can we move this logic into `def _wrap_context` or something, it's quite verbose to do it twice :-)