Remove use of deprecated get_context_instance()