Code defensively for contexts missing a local registry