MDL-39111 check repository instance context instead of repository usage context