Replace get_context_instances